mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-08 22:31:04 +00:00
Allow specifying Docker image to use for building
This commit is contained in:
parent
1492e57676
commit
a2f73a7d35
12
build.sh
12
build.sh
@ -123,11 +123,12 @@ case "${1:-default}" in
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
docker-all)
|
docker-all)
|
||||||
|
img=${DOCKERIMG:-syncthing/build:latest}
|
||||||
docker run --rm -h syncthing-builder -u $(id -u) -t \
|
docker run --rm -h syncthing-builder -u $(id -u) -t \
|
||||||
-v $(pwd):/go/src/github.com/syncthing/syncthing \
|
-v $(pwd):/go/src/github.com/syncthing/syncthing \
|
||||||
-w /go/src/github.com/syncthing/syncthing \
|
-w /go/src/github.com/syncthing/syncthing \
|
||||||
-e "STTRACE=$STTRACE" \
|
-e "STTRACE=$STTRACE" \
|
||||||
syncthing/build:latest \
|
"$img" \
|
||||||
sh -c './build.sh clean \
|
sh -c './build.sh clean \
|
||||||
&& ./build.sh test-cov \
|
&& ./build.sh test-cov \
|
||||||
&& ./build.sh bench \
|
&& ./build.sh bench \
|
||||||
@ -135,11 +136,12 @@ case "${1:-default}" in
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
docker-test)
|
docker-test)
|
||||||
|
img=${DOCKERIMG:-syncthing/build:latest}
|
||||||
docker run --rm -h syncthing-builder -u $(id -u) -t \
|
docker run --rm -h syncthing-builder -u $(id -u) -t \
|
||||||
-v $(pwd):/go/src/github.com/syncthing/syncthing \
|
-v $(pwd):/go/src/github.com/syncthing/syncthing \
|
||||||
-w /go/src/github.com/syncthing/syncthing \
|
-w /go/src/github.com/syncthing/syncthing \
|
||||||
-e "STTRACE=$STTRACE" \
|
-e "STTRACE=$STTRACE" \
|
||||||
syncthing/build:latest \
|
"$img" \
|
||||||
sh -euxc './build.sh clean \
|
sh -euxc './build.sh clean \
|
||||||
&& go run build.go -race \
|
&& go run build.go -race \
|
||||||
&& export GOPATH=$(pwd)/Godeps/_workspace:$GOPATH \
|
&& export GOPATH=$(pwd)/Godeps/_workspace:$GOPATH \
|
||||||
@ -149,21 +151,23 @@ case "${1:-default}" in
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
docker-lint)
|
docker-lint)
|
||||||
|
img=${DOCKERIMG:-syncthing/build:latest}
|
||||||
docker run --rm -h syncthing-builder -u $(id -u) -t \
|
docker run --rm -h syncthing-builder -u $(id -u) -t \
|
||||||
-v $(pwd):/go/src/github.com/syncthing/syncthing \
|
-v $(pwd):/go/src/github.com/syncthing/syncthing \
|
||||||
-w /go/src/github.com/syncthing/syncthing \
|
-w /go/src/github.com/syncthing/syncthing \
|
||||||
-e "STTRACE=$STTRACE" \
|
-e "STTRACE=$STTRACE" \
|
||||||
syncthing/build:latest \
|
"$img" \
|
||||||
sh -euxc 'go run build.go lint'
|
sh -euxc 'go run build.go lint'
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
||||||
docker-vet)
|
docker-vet)
|
||||||
|
img=${DOCKERIMG:-syncthing/build:latest}
|
||||||
docker run --rm -h syncthing-builder -u $(id -u) -t \
|
docker run --rm -h syncthing-builder -u $(id -u) -t \
|
||||||
-v $(pwd):/go/src/github.com/syncthing/syncthing \
|
-v $(pwd):/go/src/github.com/syncthing/syncthing \
|
||||||
-w /go/src/github.com/syncthing/syncthing \
|
-w /go/src/github.com/syncthing/syncthing \
|
||||||
-e "STTRACE=$STTRACE" \
|
-e "STTRACE=$STTRACE" \
|
||||||
syncthing/build:latest \
|
"$img" \
|
||||||
sh -euxc 'go run build.go vet'
|
sh -euxc 'go run build.go vet'
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user