1
1
mirror of https://github.com/adammck/terraform-inventory synced 2024-11-23 00:12:13 +01:00

Include version info in dist build

This commit is contained in:
Adam Mckaig 2015-07-05 12:32:55 -04:00
parent 517a54538d
commit be4840825d

@ -3,7 +3,7 @@ cd $(cd `dirname "$0"`; cd ..; pwd)
VERSION=$1
if [ -z $VERSION ]; then
echo "Error: VERSION must be set."
echo "Usage: $0 VERSION"
exit 1
fi
@ -20,7 +20,7 @@ for target in $TARGETS; do
NAME=${NAME}.exe
fi
go build -v -o pkg/${NAME}
go build -ldflags "-X main.build_version $VERSION" -o pkg/${NAME}
pushd pkg
zip terraform-inventory_${VERSION}_${GOOS}_${GOARCH}.zip ${NAME}