diff --git a/.gitignore b/.gitignore index 0b7755d..ff73750 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,6 @@ # program output from databag-env *.env -# go build output -databag-envdump/databag-envdump -build12/build12 -release12/release12 -docker-ssh-exec/docker-ssh-exec - # goxc build output and local config pkg/ *.goxc.local.json diff --git a/make.sh b/make.sh new file mode 100755 index 0000000..dff0a72 --- /dev/null +++ b/make.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +# runs goxc in each product directory +set -e + +echo "Building static linux binary for docker-ssh-exec..." +mkdir -p pkg +buildcmd='CGO_ENABLED=0 go build -a --installsuffix cgo --ldflags="-s" -o pkg/docker-ssh-exec' +docker run --rm -it -v "$GOPATH":/gopath -v "$(pwd)":/app -e "GOPATH=/gopath" \ + -w /app golang:1.5 sh -c "$buildcmd" + +echo "Building docker image for docker-ssh-exec..." +docker build --no-cache=true --tag mdsol/docker-ssh-exec . +rm -f pkg/docker-ssh-exec + +echo "Done. To make a release, run: goxc" +exit 0