Skip to content

Commit

Permalink
publish_npm_package.yaml: make nightly version number monotonic
Browse files Browse the repository at this point in the history
Use date formatting that include 0 for single number month and day. For example: 20240121  instead of 2024121. So that the current nightly version is bigger than the ones from December 2023
  • Loading branch information
ogoffart authored Jan 21, 2024
1 parent 168654f commit 43d1f62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/publish_npm_package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
run: |
version=`npm pkg get version | jq -r`
if [ "$RELEASE_INPUT" != "true" ]; then
nightly_version_suffix=`git log -1 --format=%cd --date="format:%Y%-m%-d%H"`
nightly_version_suffix=`git log -1 --format=%cd --date="format:%Y%m%d%H"`
version="$version-nightly.$nightly_version_suffix"
fi
echo $version
Expand Down

2 comments on commit 43d1f62

@tronical
Copy link
Member

Choose a reason for hiding this comment

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

Good idea:) should the same be done for the vscode nightly? (Same code iirc)

@ogoffart
Copy link
Member Author

Choose a reason for hiding this comment

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

vscode extension is fine because it has a dots in it and version comparison handle that:

nightly_version=`git log -1 --format=%cd --date="format:%Y.%-m.%-d%H"`

Please sign in to comment.