summaryrefslogtreecommitdiffstats
path: root/build.sh
diff options
context:
space:
mode:
authorJakob Borg <jakob@nym.se>2014-04-19 16:38:11 +0200
committerJakob Borg <jakob@nym.se>2014-04-19 16:38:11 +0200
commitf76fe1ac7af7e276c1732d763d300f9b8bd678ed (patch)
tree0a0c528faa21a69f8effb0616a6a6994b05099a7 /build.sh
parent6364c4ff3f5b27a6150aaf2d06d3f731f51259a7 (diff)
Include build date in -version output
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/build.sh b/build.sh
index 34f64043c7..e12d2b3ae3 100755
--- a/build.sh
+++ b/build.sh
@@ -4,6 +4,7 @@ export COPYFILE_DISABLE=true
distFiles=(README.md LICENSE) # apart from the binary itself
version=$(git describe --always --dirty)
+date=$(date +%s)
build() {
if command -v godep >/dev/null ; then
@@ -14,8 +15,8 @@ build() {
go get -d ./cmd/syncthing
godep=
fi
- ${godep} go build $* -ldflags "-w -X main.Version $version" ./cmd/syncthing
- ${godep} go build -ldflags "-w -X main.Version $version" ./cmd/stcli
+ ${godep} go build $* -ldflags "-w -X main.Version $version -X main.BuildStamp $date" ./cmd/syncthing
+ ${godep} go build -ldflags "-w -X main.Version $version -X main.BuildStamp $date" ./cmd/stcli
}
assets() {