Skip to content

Commit

Permalink
add top-level make.sh build script
Browse files Browse the repository at this point in the history
  • Loading branch information
Benton Roberts committed Oct 27, 2015
1 parent f59e67c commit e8579f0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
6 changes: 0 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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
Expand Down
16 changes: 16 additions & 0 deletions make.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit e8579f0

Please sign in to comment.