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

Unable to resolve version from lightweight tags #14

Closed
2m opened this issue Oct 28, 2016 · 7 comments
Closed

Unable to resolve version from lightweight tags #14

2m opened this issue Oct 28, 2016 · 7 comments

Comments

@2m
Copy link
Member

2m commented Oct 28, 2016

which are the tags that are created by GitHub when cutting a new release.

Can be fixed by adding --tags to the git describe command. PR incoming.

@dwijnand
Copy link
Member

It's a design decision to only consider annotated tags (aka exclude lightweight tags).

I should document that.

But what do you mean by "created by GitHub when cutting a new release"? Aren't GitHub releases based on the user published tags?

@2m
Copy link
Member Author

2m commented Oct 28, 2016

Aren't GitHub releases based on the user published tags?

Not necessarily. It is possible to create a new release from Releases GitHub page which will in turn create a new tag. That tag is going to be a lightweight one.

@2m
Copy link
Member Author

2m commented Oct 28, 2016

Is there a problem when considering lightweight tags in the describe?

@dwijnand
Copy link
Member

Using lightweight tags to define the version means you can never use tags for anything but the version. For instance you can't create a local "before-refactor" tag, for your convenience, and you have to use SHAs all the time. I personally believe this is a waste of a great feature in git, so I prefer only annotated tags are used for versions.

But I'm happy for sbt-dynver to have an opt-in feature that includes lightweight tags.

@2m
Copy link
Member Author

2m commented Oct 28, 2016

... you can never use tags for anything but the version ...

Are you concerned of a version being inadvertently derived from a tag which was not meant to be a version tag?

sbt-dynver uses --match to only consider tags that start with a v and a number. That should be enough to have this risk very low.

Or is there something else that I am missing?

@dwijnand
Copy link
Member

You're right, I forgot about that safe-guard - I agree it makes the risk very low.

Go ahead, and welcome, my first contributor :)

@2m
Copy link
Member Author

2m commented Oct 28, 2016

Fixed by #15

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

No branches or pull requests

2 participants