-
Notifications
You must be signed in to change notification settings - Fork 40
XINFRA-446: Support patching npm package during releases #16
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
base: master
Are you sure you want to change the base?
Conversation
|
|
||
| # Update the version with jq on the temp file, and replace the original file with the patch version if no | ||
| # problem was encountered. | ||
| if ! jq ".version = \"$version\"" "$pkg_path" > "$temp_file"; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The script relied on jq to manipulate json files.
This tool is currently not installed on the release machine, so there is likely something to change to make it available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, just needs to be installed, I guess. I think it's not the first non installed by default tool we are using in this script (even if we usually try to avoid it).
| while IFS= read -r pkg_path; do | ||
|
|
||
| ## private or unnamed packages are skipped | ||
| is_skipped=$(jq -r '.private' "$pkg_path") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm making sure that all existing packages.json files, that are not meant to be published, are private so that this script doesn't impact the release process of LTS branches?
| echo -e "\033[0;32m* Update packages to ${NEXT_SNAPSHOT_VERSION} after release\033[0m" | ||
| set_packages_version $NEXT_SNAPSHOT_VERSION | ||
| git add . | ||
| git commit -m "[release] Update packages after release ${TAG_NAME}" -q |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On LTS branches, set_packages_version will not change any file.
Therefore, git add/commit won't have side effects except for a no changes added to commit message in the log.
Sounds fine to me, but let me know if you see an issue with that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not clear to me why there is a difference between LTS branches and latest branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LTS branches don't contain packages that we want to publish on npm registries.
This new packages.json version patching is only useful for packages we want to publish.
Basically I aim to avoid noise with useless changes in LTS branches.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LTS branches don't contain packages that we want to publish on npm registries.
Well, I still don't understand why. Shouldn't we publish bugfix releases ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I expressed myself badly, I don't want to have an impact on versions prior to v18.* (where I introduced the first packages we want to publish). Regardless of the branch, version 18+ will see their package versions updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I doubt that log is a big problem, nobody is looking at it anyway :)
https://jira.xwiki.org/browse/XINFRA-446