summaryrefslogtreecommitdiffstats
path: root/build.sh
diff options
context:
space:
mode:
authorJakob Borg <jakob@nym.se>2014-03-28 14:36:57 +0100
committerJakob Borg <jakob@nym.se>2014-03-29 13:47:21 +0100
commitf87b1520e892c22da184f16e16fa95684b711e8d (patch)
tree93b179582683d852f0781cd192e9f7ce8f543070 /build.sh
parent3700eb1e61166eb9f95d1a2a6c7d606be5cbb614 (diff)
The Great Rewrite (fixes #36, #61, #94, #101)
Rewrite of the file model and pulling mechanism. Needs lots of cleanup and bugfixes, now...
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh14
1 files changed, 9 insertions, 5 deletions
diff --git a/build.sh b/build.sh
index 09ef2aa455..cac937b1c9 100755
--- a/build.sh
+++ b/build.sh
@@ -3,7 +3,7 @@
export COPYFILE_DISABLE=true
distFiles=(README.md LICENSE) # apart from the binary itself
-version=$(git describe --always)
+version=$(git describe --always --dirty)
build() {
if command -v godep >/dev/null ; then
@@ -15,6 +15,7 @@ build() {
godep=
fi
${godep} go build -ldflags "-w -X main.Version $version" ./cmd/syncthing
+ ${godep} go build -ldflags "-w -X main.Version $version" ./cmd/stcli
}
prepare() {
@@ -26,9 +27,12 @@ test() {
}
sign() {
- id=BCE524C7
- if gpg --list-keys "$id" >/dev/null 2>&1 ; then
- gpg -ab -u "$id" "$1"
+ if git describe --exact-match 2>/dev/null >/dev/null ; then
+ # HEAD is a tag
+ id=BCE524C7
+ if gpg --list-keys "$id" >/dev/null 2>&1 ; then
+ gpg -ab -u "$id" "$1"
+ fi
fi
}
@@ -79,7 +83,7 @@ case "$1" in
test || exit 1
export GOARM=7
- for os in darwin-amd64 linux-amd64 linux-arm freebsd-amd64 ; do
+ for os in darwin-amd64 linux-amd64 linux-arm freebsd-amd64 windows-amd64 ; do
export GOOS=${os%-*}
export GOARCH=${os#*-}