publish_npm_package.yaml: make nightly version number monotonic

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
This commit is contained in:
Olivier Goffart 2024-01-21 09:25:07 +01:00 committed by GitHub
parent 168654fa29
commit 43d1f62fb1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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