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

Remove hash from version #99

Merged
merged 8 commits into from
Apr 22, 2024
Merged

Conversation

thomasm-ttd
Copy link
Contributor

Removing the commit hash from version numbers as it is no longer necessary.
The snapshot version is now calculated to be x.y.z-alpha-n-SNAPSHOT where:
x and y are the current major and minor versions
z = current patch version plus one
n = GITHUB_RUN_NUMBER so that different branches from the same version do not have conflicting numbers.

Tested here:
https://github.com/IABTechLab/uid2-shared/actions/runs/8776854950
https://github.com/IABTechLab/uid2-core/actions/runs/8776987345

echo "new_version=$NBGV_SimpleVersion-$NBGV_GitCommitIdShort-$BRANCH_NAME_TRUNC" >> $GITHUB_OUTPUT
elif [[ "${{ inputs.short_name }}" == "Yes" ]]; then
echo "new_version=$NBGV_SimpleVersion" >> $GITHUB_OUTPUT
echo "new_version=$NBGV_SimpleVersion-$BRANCH_NAME_TRUNC" >> $GITHUB_OUTPUT
Copy link
Contributor

Choose a reason for hiding this comment

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

What cases do we have with no version supplied and no pom.xml in the working dir? It looks like there's a risk for branch builds in that case - we'll go from having uniquely-identified branch releases to having conflicting ones for multiple releases on the same branch.

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually - I wasn't accounting for NBGV incrementing the version. I think we're fine.

@thomasm-ttd thomasm-ttd merged commit 4b49fb2 into main Apr 22, 2024
@thomasm-ttd thomasm-ttd deleted the tjm-UID2-1405-remove-hash-from-version branch April 22, 2024 01:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants