Skip to content
This repository has been archived by the owner on Jan 2, 2021. It is now read-only.

Commit

Permalink
DIND is stupid
Browse files Browse the repository at this point in the history
  • Loading branch information
titpetric committed Feb 7, 2018
1 parent 0ec4c56 commit 1307348
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions build-docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
docker build --rm -t pendulum-build -f Dockerfile.build .
docker run --rm -it -v $PWD:/go/src/github.com/titpetric/pendulum pendulum-build ./build.sh
docker rmi pendulum-build
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -e
PROJECT=$(basename $(dirname $(readlink -f $0)))

docker run --rm -v $PWD:/go/src/github.com/titpetric/$PROJECT -w /go/src/github.com/titpetric/$PROJECT -e GOOS=linux -e GOARCH=${ARCH} -e CGO_ENABLED=0 -e GOARM=7 titpetric/golang go generate
go generate

NAMES=$(ls cmd/* -d | xargs -n1 basename)
for NAME in $NAMES; do
Expand All @@ -11,7 +11,7 @@ for NAME in $NAMES; do
for ARCH in $ARCHS; do
for OS in $OSES; do
echo $OS $ARCH $NAME
docker run --rm -v $PWD:/go/src/github.com/titpetric/$PROJECT -w /go/src/github.com/titpetric/$PROJECT -e GOOS=${OS} -e GOARCH=${ARCH} -e CGO_ENABLED=0 -e GOARM=7 titpetric/golang go build -o build/${NAME}-${OS}-${ARCH} cmd/${NAME}/*.go
GOOS=${OS} GOARCH=${ARCH} CGO_ENABLED=0 GOARM=7 go build -o build/${NAME}-${OS}-${ARCH} cmd/${NAME}/*.go
if [ $? -eq 0 ]; then
echo OK
fi
Expand Down

0 comments on commit 1307348

Please sign in to comment.