Masterminds / glide

Package Management for Golang
https://glide.sh
Other
8.15k stars 541 forks source link

Proposal: Setting a version via script during a git tag operation #336

Open technosophos opened 8 years ago

technosophos commented 8 years ago

I've seen a number of cases now where the output of glide --version is dev because Glide was built without using the Makefile. (go get being a great example)

What if we wrote a script or make target called tag that did the following:

Given a SemVer tag...

That way, a build would have the version 1.2.3, and anything fetched with go get would have 1.2.3+dev. Anything built with make would have a precise version.

mattfarina commented 8 years ago

If we want to be more fine grained we could use a commit hook to alter it on each commit.

technosophos commented 8 years ago

I was under the impression that those hooks had to fire client-side, which means it would become a prerequisite for committing to Glide. That would make me a little uncomfortable.

sdboyer commented 8 years ago

not too bad if it's just a couple people using it - and if you can write instrumentation into the makefile that automatically injects it into the git repository (which is possible).