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

Is it possible to use git.useGitDescribe with parameters? #155

Open
mrt181 opened this issue Jun 15, 2018 · 0 comments
Open

Is it possible to use git.useGitDescribe with parameters? #155

mrt181 opened this issue Jun 15, 2018 · 0 comments

Comments

@mrt181
Copy link

mrt181 commented Jun 15, 2018

I would like to omit the distance and sha from the version number and just use SNAPSHOT when distance exists.

This is possible with git

$ git describe --abbrev=0
0.6.0
$ git describe
0.6.0-2-gcb7e6ae

--abbrev=0 also nicely handles the case where the version tag might contain some prerelease suffix
e.g.

$ git describe --abbrev=0
0.6.0-rc2
$ git describe
0.6.0-rc2-2-gcb7e6ae

I can use a custom git.gitTagToVersionNumber and manipulate the version but this is tricky if tags follow semver and are checked vs this regex https://regex101.com/r/gG8cK7/1

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

1 participant