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

Allow building from a detached tag, since there is no need to calculate the increment #2411

Merged
merged 4 commits into from
Oct 13, 2020
Merged

Allow building from a detached tag, since there is no need to calculate the increment #2411

merged 4 commits into from
Oct 13, 2020

Conversation

gerwinjansen
Copy link
Contributor

Description

Rejection of a detached head now only happens if no tag is available

Related Issue

Fixes #2301 GitVersionTask fails when building from a tag

Motivation and Context

Detached HEADs were always rejected, because a branch is needed to calculate the next version. But this is not required for tagged commits, since the version is directly derived from the tag.

How Has This Been Tested?

git init
git commit --allow-empty -m "init"
git branch task1
git tag v0.2
git checkout v0.2
gitversion

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@lucaritossa
Copy link

@asbjornu please give this PR an high priority so it can be released asap. The issue is very annoying...

@asbjornu asbjornu added this to the 5.5.0 milestone Oct 13, 2020
@asbjornu
Copy link
Member

This is most excellent. Thank you so much for fixing this, @gerwinjansen! 🙏

@asbjornu asbjornu merged commit 124b89c into GitTools:master Oct 13, 2020
@gerwinjansen gerwinjansen deleted the allow-building-from-detached-tag branch October 13, 2020 13:17
@arturcic arturcic removed this from the 5.5.0 milestone Oct 26, 2020
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.

GitVersionTask fails when building from a tag
5 participants