mirror of
https://github.com/adammck/terraform-inventory
synced 2024-11-23 04:22:08 +01:00
Include version info in dist build
This commit is contained in:
parent
517a54538d
commit
be4840825d
4
bin/dist
4
bin/dist
@ -3,7 +3,7 @@ cd $(cd `dirname "$0"`; cd ..; pwd)
|
|||||||
|
|
||||||
VERSION=$1
|
VERSION=$1
|
||||||
if [ -z $VERSION ]; then
|
if [ -z $VERSION ]; then
|
||||||
echo "Error: VERSION must be set."
|
echo "Usage: $0 VERSION"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -20,7 +20,7 @@ for target in $TARGETS; do
|
|||||||
NAME=${NAME}.exe
|
NAME=${NAME}.exe
|
||||||
fi
|
fi
|
||||||
|
|
||||||
go build -v -o pkg/${NAME}
|
go build -ldflags "-X main.build_version $VERSION" -o pkg/${NAME}
|
||||||
|
|
||||||
pushd pkg
|
pushd pkg
|
||||||
zip terraform-inventory_${VERSION}_${GOOS}_${GOARCH}.zip ${NAME}
|
zip terraform-inventory_${VERSION}_${GOOS}_${GOARCH}.zip ${NAME}
|
||||||
|
Loading…
Reference in New Issue
Block a user