Skip to content

Commit

Permalink
Include version info in dist build
Browse files Browse the repository at this point in the history
  • Loading branch information
adammck committed Jul 5, 2015
1 parent 517a545 commit be48408
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/dist
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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}
Expand Down

0 comments on commit be48408

Please sign in to comment.