diff --git a/cross-compile.sh b/cross-compile.sh index aafc4eed..c8ff3e83 100755 --- a/cross-compile.sh +++ b/cross-compile.sh @@ -1,13 +1,17 @@ #!/bin/bash +VERSION="0.2" + rm -rf dist; mkdir -p dist for GOOS in darwin linux windows; do for GOARCH in 386 amd64; do echo "Building $GOOS-$GOARCH" if [[ $GOOS == "windows" ]]; then - env GOOS=$GOOS GOARCH=$GOARCH go build -o dist/aws-es-proxy-${GOOS}-${GOARCH}.exe + env GOOS=$GOOS GOARCH=$GOARCH go build -o dist/aws-es-proxy-${VERSION}-${GOOS}-${GOARCH}.exe + elif [[ $GOOS == "darwin" ]]; then + env GOOS=$GOOS GOARCH=$GOARCH go build -o dist/aws-es-proxy-${VERSION}-mac-${GOARCH} else - env GOOS=$GOOS GOARCH=$GOARCH go build -o dist/aws-es-proxy-${GOOS}-${GOARCH} + env GOOS=$GOOS GOARCH=$GOARCH go build -o dist/aws-es-proxy-${VERSION}-${GOOS}-${GOARCH} fi done done