*: properly compile version into docker images

This commit is contained in:
Eric Chiang
2016-10-13 17:58:40 -07:00
parent f37836490b
commit 3dac0063df
4 changed files with 16 additions and 8 deletions

View File

@@ -1,4 +1,5 @@
#!/bin/bash -e
#!/bin/sh -e
# Since this script will be run in a rkt container, use "/bin/sh" instead of "/bin/bash"
# parse the current git commit hash
COMMIT=`git rev-parse HEAD`
@@ -18,4 +19,4 @@ if [ -n "$(git diff --shortstat 2> /dev/null | tail -n1)" ]; then
VERSION="${VERSION}-dirty"
fi
echo $VERSION
echo $VERSION

View File

@@ -10,4 +10,4 @@ sudo rkt run \
--insecure-options=image \
docker://golang:1.7.1-alpine \
--exec=/bin/sh -- -x -c \
'apk add --no-cache --update alpine-sdk && go install -v github.com/coreos/dex/cmd/dex && cp /go/bin/dex /go/src/github.com/coreos/dex/_output/bin'
'apk add --no-cache --update alpine-sdk && cd /go/src/github.com/coreos/dex && make release-binary'