Skip to content

Improve change-version script - #38983

Merged
XhmikosR merged 2 commits into
mainfrom
xmr/change-version
Aug 21, 2023
Merged

Improve change-version script#38983
XhmikosR merged 2 commits into
mainfrom
xmr/change-version

Conversation

@XhmikosR

@XhmikosR XhmikosR commented Jul 31, 2023

Copy link
Copy Markdown
Member

Only replace the version in specific files instead of blindly all repo files

EDIT: let's merge this after #38984

@XhmikosR
XhmikosR force-pushed the xmr/change-version branch from c036755 to 088a6b4 Compare July 31, 2023 06:54
@XhmikosR
XhmikosR marked this pull request as ready for review July 31, 2023 21:50
@XhmikosR
XhmikosR requested a review from a team as a code owner July 31, 2023 21:50
@XhmikosR
XhmikosR force-pushed the xmr/change-version branch from e27dcff to c160cfe Compare August 1, 2023 08:21
@XhmikosR
XhmikosR marked this pull request as draft August 1, 2023 08:37
@XhmikosR
XhmikosR force-pushed the xmr/change-version branch from c160cfe to d0abc77 Compare August 6, 2023 04:44
Comment thread build/change-version.mjs Fixed
@XhmikosR
XhmikosR force-pushed the xmr/change-version branch from d0abc77 to e55e441 Compare August 6, 2023 04:48
@XhmikosR
XhmikosR marked this pull request as ready for review August 6, 2023 04:49
@XhmikosR
XhmikosR force-pushed the xmr/change-version branch from e55e441 to 10eebe2 Compare August 6, 2023 04:50
Only replace the version in specific files instead of blindly all repo files
@GeoSot
GeoSot force-pushed the xmr/change-version branch from 10eebe2 to d4792ea Compare August 14, 2023 12:48
Comment thread build/change-version.mjs
Comment on lines +72 to +73
console.error(error)
process.exit(1)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
console.error(error)
process.exit(1)
console.error(error)
process.exit(1)

Suppose we could use throw error here, too?

Comment thread build/change-version.mjs
try {
await Promise.all(
files.map(file => replaceRecursively(file, oldVersion, newVersion))
FILES.map(file => replaceRecursively(file, oldVersion, newVersion))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need the recursive replacement?

@XhmikosR

Copy link
Copy Markdown
Member Author

@GeoSot The changes are based on the script we use in bootstrap-icons: https://github.com/twbs/icons/blob/main/build/bump-version.mjs

So, the plan is to keep them in sync for now.

@GeoSot

GeoSot commented Aug 14, 2023

Copy link
Copy Markdown
Member

@GeoSot The changes are based on the script we use in bootstrap-icons: https://github.com/twbs/icons/blob/main/build/bump-version.mjs

So, the plan is to keep them in sync for now.

In this case, I think we are good to go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants