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
packageName=version
version=$(git describe --tags)
PACKAGE_NAME=version
if [[ -z $VERSION ]] ; then
VERSION=$(git describe --tags)
fi
cat <<END
// +build release
package $packageName
package $PACKAGE_NAME
const Version = "${version}"
const Version = "${VERSION}"
END