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

build: support a release candidate version #2543

Merged
merged 1 commit into from
Dec 20, 2023

Conversation

reubenmiller
Copy link
Contributor

@reubenmiller reubenmiller commented Dec 20, 2023

Proposed changes

Support release candidate info in the version (e.g. 1.0.0-rc.1).

And adding support for auto incrementing from the previous release candidate version after merging into main (instead of bumping just the patch version)

Below shows the version numbers in different scenarios:

Main branch - 231 commits past tag 0.13.1

$ just version
GIT_SEMVER: 0.13.2~231+g141c1d0
APK_VERSION: 0.13.2_rc231+g141c1d0
DEB_VERSION: 0.13.2~231+g141c1d0
RPM_VERSION: 0.13.2~231+g141c1d0
CONTAINER_VERSION: 0.13.2-231-g141c1d0
TARBALL_VERSION: 0.13.2-rc231+g141c1d0

Tag 1.0.0-rc.1

$ just version
GIT_SEMVER: 1.0.0-rc.1
APK_VERSION: 1.0.0_rc.1
DEB_VERSION: 1.0.0-rc.1
RPM_VERSION: 1.0.0-rc.1
CONTAINER_VERSION: 1.0.0-rc.1
TARBALL_VERSION: 1.0.0-rc.1

Main branch - 2 commits past tag 1.0.0-rc.1

$ just version
GIT_SEMVER: 1.0.0-rc.2~2+g75e8db9
APK_VERSION: 1.0.0_rc.2-2+g75e8db9
DEB_VERSION: 1.0.0-rc.2~2+g75e8db9
RPM_VERSION: 1.0.0-rc.2~2+g75e8db9
CONTAINER_VERSION: 1.0.0-rc.2-2-g75e8db9
TARBALL_VERSION: 1.0.0-rc.2-2+g75e8db9

Tag: 1.0.0

$ just version
GIT_SEMVER: 1.0.0
APK_VERSION: 1.0.0
DEB_VERSION: 1.0.0
RPM_VERSION: 1.0.0
CONTAINER_VERSION: 1.0.0
TARBALL_VERSION: 1.0.0

Main branch - 1 commit past tag 1.0.0

$ just version
GIT_SEMVER: 1.0.1~1+ge026908
APK_VERSION: 1.0.1_rc1+ge026908
DEB_VERSION: 1.0.1~1+ge026908
RPM_VERSION: 1.0.1~1+ge026908
CONTAINER_VERSION: 1.0.1-1-ge026908
TARBALL_VERSION: 1.0.1-rc1+ge026908

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (general improvements like code refactoring that doesn't explicitly fix a bug or add any new functionality)
  • Documentation Update (if none of the other choices apply)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Paste Link to the issue


Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA (in all commits with git commit -s)
  • I ran cargo fmt as mentioned in CODING_GUIDELINES
  • I used cargo clippy as mentioned in CODING_GUIDELINES
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

Whilst editing the version.sh script, it has become clear that due to the complex version requires, the version.sh will have to be replaced by another solution which is more "testable" and easier to maintain. Ideally existing tooling could be used, however it still must meet the auto versioning requirements.

@reubenmiller reubenmiller added the ci/cd Repository management and pipeline topics label Dec 20, 2023
Signed-off-by: Reuben Miller <reuben.d.miller@gmail.com>
Copy link
Contributor

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
378 0 3 378 100 59m47.451s

Copy link
Contributor

@didier-wenzek didier-wenzek left a comment

Choose a reason for hiding this comment

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

Approved.

Indeed not handy to test as the input is git describe.
I tested a modified version to be able to set misc GIT_DESCRIBE_RAW.

@reubenmiller
Copy link
Contributor Author

Approved.

Indeed not handy to test as the input is git describe. I tested a modified version to be able to set misc GIT_DESCRIBE_RAW.

Yes that sounds like a good idea to be able to control the output of git describe to use in testing etc. I'll keep it under consideration when evaluating more testable options for replacing the version.sh script.

@reubenmiller reubenmiller merged commit 826108f into thin-edge:main Dec 20, 2023
16 checks passed
@reubenmiller reubenmiller deleted the support-rc-version branch December 20, 2023 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci/cd Repository management and pipeline topics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants