-
Notifications
You must be signed in to change notification settings - Fork 426
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
drive version
should report git's short commit hash
#138
Comments
drive version
should report git's short commit hash
I don't know what to think about this, this will be coupling too much of git with drive of which I might be bound to forget during dev. Might be helpful for debugging otherwise. |
One example of another project that does this is docker:
|
For sure. I'll have to hard code it, which is what I am worried about forgetting. |
Never mind my last comment, I think I've conjured a way to solve this without any hard coding . I'll do this when I get back home. |
Please checkout PR #144 |
The git hash reported by 'drive about' is dynamically detected. For example,
The result git hash of step 1 and 3 are different. But the 'drive' binary actually doesn't change. This may give misleading information for advanced users. docker solves this problem using additional build script. For pure go solution, https://blog.golang.org/generate may be useful. However, it requires go 1.4 |
That is true, it just selects the most recent hash. For starters, the average user (at least from the interactions I've had) will not be building drive frequently. Thank you, I'll take a look at Docker's solution |
Just saw Docker's solution: ahaha I had an initial solution exactly like theirs before but figured it would not work for our build currently. See none of those solutions will work directly. Another solution that I had was a packager for drive, that would build the binary and get the hash right then. |
Please help me take a look at #151, if you can. |
You can now do $ go get github.com/odeke-em/drive/drive-gen && drive-gen |
No description provided.
The text was updated successfully, but these errors were encountered: