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

Set version as release when there are no commits ahead #3515

Merged
merged 1 commit into from
Oct 22, 2024

Conversation

niten94
Copy link
Contributor

@niten94 niten94 commented Oct 21, 2024

The release version that is built can be detected as a development version in tools/build-version.go when the commit has another tag that is not a version number like nightly, so the release version is printed instead if there are no commits ahead in this pull request.

if tag == versionStr {
if tag == versionStr || ahead == nil {
Copy link
Collaborator

@JoeKar JoeKar Oct 21, 2024

Choose a reason for hiding this comment

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

But doesn't that mean we've no versionStr right now?
I know we're coming from #3514 resp. termux/termux-packages#21286.

Edit:
Got it...it hits when a release will be tagged later as nightly and this tag is checked out instead of e.g. v2.0.14.

Edit2:
Should work. I tried it with a local v2.0.15 along to the actual nightly.

Copy link
Collaborator

Choose a reason for hiding this comment

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

If we do this if ahead is nil no matter what getTag("--exact-match") returned, why don't we check ahead before even calling getTag("--exact-match")?

Copy link
Contributor Author

@niten94 niten94 Oct 22, 2024

Choose a reason for hiding this comment

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

I didn't think much about checking ahead before calling getTag("--exact-match"). It does not have to be called when there are no commits between the version tag because the release version will be printed, so I will move the if statement before the call and remove tag == versionStr.

@JoeKar
Copy link
Collaborator

JoeKar commented Oct 21, 2024

@dmaluka Do you agree?

Print release version tag in tools/build-version.go even if the commit
being checked has a tag that is not a version number if there are no
commits ahead.
@dmaluka dmaluka merged commit 2c6dc32 into zyedidia:master Oct 22, 2024
6 checks passed
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