improve Makefile for building dist and versions

This commit is contained in:
c9s 2021-05-07 14:08:41 +08:00
parent f67075c818
commit d60d13d9db

View File

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