-
Notifications
You must be signed in to change notification settings - Fork 53
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
packaging: align version schema used in packaging #2188
packaging: align version schema used in packaging #2188
Conversation
Robot Results
|
Refactor the scripts to use a version script instead where the env variables can be exported from a central place Signed-off-by: Reuben Miller <reuben.d.miller@gmail.com>
Signed-off-by: Reuben Miller <reuben.d.miller@gmail.com>
Signed-off-by: Reuben Miller <reuben.d.miller@gmail.com>
9bb968d
to
bdc2ede
Compare
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.
This works as explained.
However I have been surprised to see that once the user that a version, than version.sh
stick on this version previously set.
$ . ci/build_scripts/version.sh
$ echo $APK_VERSION '|' $DEB_VERSION '|' $RPM_VERSION '|' $GIT_SEMVER
0.12.1_rc146+gbdc2ede | 0.12.1~146+gbdc2ede | 0.12.1~146+gbdc2ede | 0.12.1~146+gbdc2ede
$ . ci/build_scripts/version.sh --version 1.0
Using version set by user: 1.0
$ echo $APK_VERSION '|' $DEB_VERSION '|' $RPM_VERSION '|' $GIT_SEMVER
1.0 | 1.0 | 1.0 | 1.0
$ . ci/build_scripts/version.sh
Using version set by user: 1.0
$ echo $APK_VERSION '|' $DEB_VERSION '|' $RPM_VERSION '|' $GIT_SEMVER
1.0 | 1.0 | 1.0 | 1.0
This is also surprising:
$ . ./ci/build_scripts/version.sh
Using version set by user: 0.12.1~146+gbdc2ede
At least it would be good to tell how to reset the version
$ unset GIT_SEMVER
$ ./ci/build_scripts/version.sh
0.12.1~146+gbdc2ede
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.
Approved.
Is the surprising bit the log message? as it gives the wrong impression that it was set by a user (when that is not always true) |
The surprising bit is that I was not expecting the version to be cached and furthermore in that case not set by me. This is really minor. |
Ah yes, correct. I guess I've never noticed it as I've sourced the version.sh script from other scripts in an isolated shell so it does not bleed the environment variables into my current shell's environment. Though if you just want to inspect the versions, then you can call the script (and not source it), e.g. ./ci/build_scripts/version.sh all output
|
Signed-off-by: Reuben Miller <reuben.d.miller@gmail.com>
Proposed changes
Update version scheme used in packages to align with best practices.
General
apk
x.x.x_rcN+gabcdef0-r0
to align with Alpine Linux formattarball
x.x.x-rcN+gabcdef0
so that cloudsmith sorts packages built on the main branch correctlyTypes of changes
Paste Link to the issue
Checklist
cargo fmt
as mentioned in CODING_GUIDELINEScargo clippy
as mentioned in CODING_GUIDELINESFurther comments