2015-10-05 20:32:10 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -eu
|
|
|
|
|
2015-12-20 17:44:11 +01:00
|
|
|
cd "$(dirname "$0")"
|
|
|
|
|
2015-11-01 13:55:35 +01:00
|
|
|
GITVERSION=$(git describe --tags --dirty)
|
|
|
|
|
2015-12-20 17:30:10 +01:00
|
|
|
# go version go1.5.1 linux/amd64
|
|
|
|
V=$(go version | cut -d" " -f3 | cut -c3-5)
|
|
|
|
|
|
|
|
if [ $V == "1.3" -o $V == "1.4" ]
|
|
|
|
then
|
|
|
|
go build -ldflags="-X main.GitVersion $GITVERSION"
|
|
|
|
else
|
2015-12-20 17:44:11 +01:00
|
|
|
# Go 1.5 wants an "=" here
|
2015-12-20 17:30:10 +01:00
|
|
|
go build -ldflags="-X main.GitVersion=$GITVERSION"
|
|
|
|
fi
|
|
|
|
|
|
|
|
./gocryptfs -version
|