Add script/.build to keep BUILD_FLAGS in one place

This commit is contained in:
Tomas Kral
2016-08-11 16:50:16 +02:00
parent a15a8f36ca
commit e64f1c1215
4 changed files with 19 additions and 9 deletions
+7 -4
View File
@@ -1,14 +1,17 @@
#!/bin/bash
set -e
source "$(dirname "$BASH_SOURCE")/.build"
OUT_FILE="./kompose"
# Get rid of existing binary
rm -f kompose
rm -f $OUT_FILE
# Build binary
go build \
-tags experimental \
-o kompose \
-ldflags="-w -X github.com/skippbox/kompose/version.GITCOMMIT=${GITCOMMIT}" \
"${BUILD_FLAGS[@]}" \
-o $OUT_FILE \
./cli/main
if [ $? -eq 0 ]; then