summaryrefslogtreecommitdiffstats
path: root/build.sh
diff options
context:
space:
mode:
authorJakob Borg <jakob@nym.se>2015-08-21 13:13:12 +0200
committerJakob Borg <jakob@nym.se>2015-08-21 13:13:12 +0200
commit626b26a227617de471863e816a290d1603b5fd92 (patch)
tree03cea51fb38d5943daf88cf4a0d81d6fc762e2b7 /build.sh
parentc46db0761e5d0020134f71af9a51db72fe23c112 (diff)
Pass -sign parameter to build.go from Docker if key is present
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh34
1 files changed, 20 insertions, 14 deletions
diff --git a/build.sh b/build.sh
index 91af5be42..e26cd8597 100755
--- a/build.sh
+++ b/build.sh
@@ -74,27 +74,33 @@ case "${1:-default}" in
;;
all)
- build -goos darwin -goarch amd64 tar
+ if [ -f /etc/syncthing/syncthing.priv ] ; then
+ # Default signing key location. If present, use it to sign the
+ # release.
+ extra=(-sign /etc/syncthing/syncthing.priv)
+ fi
+
+ build -goos darwin -goarch amd64 ${extra[@]-} tar
- build -goos dragonfly -goarch amd64 tar
+ build -goos dragonfly -goarch amd64 ${extra[@]-} tar
- build -goos freebsd -goarch 386 tar
- build -goos freebsd -goarch amd64 tar
+ build -goos freebsd -goarch 386 ${extra[@]-} tar
+ build -goos freebsd -goarch amd64 ${extra[@]-} tar
- build -goos linux -goarch 386 tar
- build -goos linux -goarch amd64 tar
- build -goos linux -goarch arm tar
+ build -goos linux -goarch 386 ${extra[@]-} tar
+ build -goos linux -goarch amd64 ${extra[@]-} tar
+ build -goos linux -goarch arm ${extra[@]-} tar
- build -goos netbsd -goarch 386 tar
- build -goos netbsd -goarch amd64 tar
+ build -goos netbsd -goarch 386 ${extra[@]-} tar
+ build -goos netbsd -goarch amd64 ${extra[@]-} tar
- build -goos openbsd -goarch 386 tar
- build -goos openbsd -goarch amd64 tar
+ build -goos openbsd -goarch 386 ${extra[@]-} tar
+ build -goos openbsd -goarch amd64 ${extra[@]-} tar
- build -goos solaris -goarch amd64 tar
+ build -goos solaris -goarch amd64 ${extra[@]-} tar
- build -goos windows -goarch 386 zip
- build -goos windows -goarch amd64 zip
+ build -goos windows -goarch 386 ${extra[@]-} zip
+ build -goos windows -goarch amd64 ${extra[@]-} zip
;;
test-cov)