Last active
December 4, 2018 02:30
-
-
Save spikeekips/be0ff947606337d3a62d77b4f480e6ae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -e | |
set -x | |
label=$1 | |
if [ -z "$label" ];then | |
label="patch" | |
else | |
case $label in | |
"major"|"minor"|"patch") | |
;; | |
*) | |
echo "invalid label; major|minor|patch" | |
exit 1 | |
esac | |
fi | |
bumpversion $label | |
v=$(cat VERSION) | |
target=../build/$(date +%Y%m%d%H%M%S) | |
mkdir -p $target || true | |
for i in darwin linux freebsd | |
do | |
o=$target/sebak-$i-v$v-amd64 | |
mkdir -p $o || true | |
GOOS=$i GOARCH=amd64 go build -o $o/sebak -ldflags="$(govvv -flags -pkg boscoin.io/sebak/lib/version)" boscoin.io/sebak/cmd/sebak | |
$o/sebak version || true | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment