diff options
author | Jakob Unterwurzacher | 2015-11-01 13:55:35 +0100 |
---|---|---|
committer | Jakob Unterwurzacher | 2015-11-01 14:04:29 +0100 |
commit | 3f490d4d86067761e6fdddd438f6fd045b7e58ef (patch) | |
tree | 4800448ca10636995000bb9bcedd3d636178a9ed /build.bash | |
parent | af923d2d16e0eedc7d2c203e28a42b6af49a51f5 (diff) |
Bake version string into binary, add "--version" switch
Example:
./gocryptfs -version
gocryptfs v0.2-20-gabcef9e-dirty; on-disk format 1
Note that you MUST compile using "./build.bash" for this to work.
Diffstat (limited to 'build.bash')
-rwxr-xr-x | build.bash | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -2,4 +2,6 @@ set -eu -go build +GITVERSION=$(git describe --tags --dirty) + +go build -ldflags="-X main.GitVersion=$GITVERSION" && ./gocryptfs -version |