Browse Source

Actually map the key into Docker

Jakob Borg 10 years ago
parent
commit
2eead17224
1 changed files with 7 additions and 0 deletions
  1. 7 0
      build.sh

+ 7 - 0
build.sh

@@ -134,10 +134,17 @@ case "${1:-default}" in
 
 	docker-all)
 		img=${DOCKERIMG:-syncthing/build:latest}
+		if [ -f /etc/syncthing/syncthing.priv ] ; then
+			# Default signing key location. If present, pass into Docker so we
+			# can sign the release from in there.
+			extra=(-v /etc/syncthing/syncthing.priv:/etc/syncthing/syncthing.priv)
+		fi
+
 		docker run --rm -h syncthing-builder -u $(id -u) -t \
 			-v $(pwd):/go/src/github.com/syncthing/syncthing \
 			-w /go/src/github.com/syncthing/syncthing \
 			-e "STTRACE=$STTRACE" \
+			${extra[@]-} \
 			"$img" \
 			sh -c './build.sh clean \
 				&& ./build.sh test-cov \