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

getCurrentTag command #105

Open
zhil opened this issue Oct 23, 2016 · 2 comments
Open

getCurrentTag command #105

zhil opened this issue Oct 23, 2016 · 2 comments
Labels

Comments

@zhil
Copy link

zhil commented Oct 23, 2016

In order to get currently deployed tag name I use bash code like

GIT_HASH=$(git rev-parse HEAD)
GIT_TAG=$(git name-rev --tags --name-only ${GIT_HASH})

Its very fast even for repositories for tons of tags (fetching all tags with hashes and searching over them would be too slow).

Will you accept PR with such a command?

@zhil
Copy link
Author

zhil commented Oct 23, 2016

Another possible solution

git symbolic-ref -q --short HEAD || git describe --tags --exact-match

not sure how to execute such a command using GitElephant.

@matteosister
Copy link
Owner

The second one looks not really easy to implement. I'm not so much into this library anymore, so if you want to send a PR that fits the library goals, and do not breaks backward compatibility it would be awesome. Many thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants