ok-borg / borg

Search and save shell snippets without leaving your terminal
Apache License 2.0
1.61k stars 58 forks source link

Add --version and create version at compile time #40

Closed KlausVii closed 7 years ago

KlausVii commented 7 years ago

Issue #35 version is created from

git describe --tags
jeremyletang commented 7 years ago

oh moreover it could be intersting to include the git sha1 of the commit of the build in the version. So if the user with a bug built borg himself, we can know with which exact version it was. borg version 1.2.0 (linux/amd64 cab3bb14facc6eb6985e13f8a49ce3c662fa7d06).

KlausVii commented 7 years ago

git describe --tags outputs: v0.0.2-50-g533652d, where 50 is the number of commits since the v0.0.2 and 533652d is the short SHA of the latest commit, so it already contains the exact version info.

jeremyletang commented 7 years ago

hey this is working well, thanks for the PR !