[build.sh] Version definition will now be groked from VERSION file if not in git repository

This commit is contained in:
ayakael 2018-06-26 06:57:40 -08:00
parent 75a98d636e
commit 53ab36c76d
No known key found for this signature in database
GPG key ID: 575626A4AE5F4026

View file

@ -29,7 +29,8 @@ gen_help() {
gen_env() {
echo -e "#!/bin/bash\n"
echo "VERSION=$(git describe --tags)"
[[ $(git describe --tags) ]] && VERSION=$(git describe --tags) || VERSION=$(cat VERSION)
echo "VERSION=${VERSION}"
awk '!/^ *#/ && NF' src/env
}