You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
392 B
21 lines
392 B
#!/bin/bash -
|
|
#
|
|
|
|
|
|
# get current tag
|
|
VERSION=$(git name-rev --tags --name-only $(git rev-parse HEAD))
|
|
|
|
# use the latest tag
|
|
if test "X$VERSION" = "Xundefined"
|
|
then
|
|
VERSION="$(git describe --abbrev=0 --tags)"
|
|
if test -z "$VERSION"
|
|
then
|
|
VERSION="0.0.1"
|
|
fi
|
|
VERSION="${VERSION}.dev"
|
|
fi
|
|
|
|
SHA=$(git rev-parse HEAD)
|
|
exec go build -ldflags "-X main.GOSUV_VERSION=$VERSION"
|