Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve change-version script #38983

Merged
merged 2 commits into from
Aug 21, 2023
Merged

Improve change-version script #38983

merged 2 commits into from
Aug 21, 2023

Conversation

XhmikosR
Copy link
Member

@XhmikosR XhmikosR commented Jul 31, 2023

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

EDIT: let's merge this after #38984

@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 marked this pull request as draft August 1, 2023 08:37
build/change-version.mjs Fixed Show fixed Hide fixed
@XhmikosR XhmikosR marked this pull request as ready for review August 6, 2023 04:49
Only replace the version in specific files instead of blindly all repo files
Comment on lines +72 to +73
console.error(error)
process.exit(1)
Copy link
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?

await Promise.all(
files.map(file => replaceRecursively(file, oldVersion, newVersion))
FILES.map(file => replaceRecursively(file, oldVersion, newVersion))
Copy link
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
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
Copy link
Member

GeoSot commented Aug 14, 2023

@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.

2 participants