Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.

Commit e8579f0

Browse files
author
Benton Roberts
committed
add top-level make.sh build script
1 parent f59e67c commit e8579f0

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

.gitignore

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
# program output from databag-env
22
*.env
33

4-
# go build output
5-
databag-envdump/databag-envdump
6-
build12/build12
7-
release12/release12
8-
docker-ssh-exec/docker-ssh-exec
9-
104
# goxc build output and local config
115
pkg/
126
*.goxc.local.json

make.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
# runs goxc in each product directory
3+
set -e
4+
5+
echo "Building static linux binary for docker-ssh-exec..."
6+
mkdir -p pkg
7+
buildcmd='CGO_ENABLED=0 go build -a --installsuffix cgo --ldflags="-s" -o pkg/docker-ssh-exec'
8+
docker run --rm -it -v "$GOPATH":/gopath -v "$(pwd)":/app -e "GOPATH=/gopath" \
9+
-w /app golang:1.5 sh -c "$buildcmd"
10+
11+
echo "Building docker image for docker-ssh-exec..."
12+
docker build --no-cache=true --tag mdsol/docker-ssh-exec .
13+
rm -f pkg/docker-ssh-exec
14+
15+
echo "Done. To make a release, run: goxc"
16+
exit 0

0 commit comments

Comments
 (0)