bbgo_origin/utils/generate-version-file.sh

17 lines
188 B
Bash
Executable File

#!/bin/bash
PACKAGE_NAME=version
if [[ -z $VERSION ]] ; then
VERSION=$(git describe --tags)
fi
cat <<END
// +build release
package $PACKAGE_NAME
const Version = "${VERSION}"
END