1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-01 04:14:16 -04:00

Merge pull request #988 from ailin-nemui/version

show output of git describe as PACKAGE_VERSION
This commit is contained in:
ailin-nemui 2019-01-16 09:47:49 +01:00 committed by GitHub
commit 9ec2c8cee4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,11 +18,7 @@ if echo "${VERSION}" | grep -q -- -head; then
# -head version, get extra details from git if we can
git_version=$(GIT_DIR=$1/.git git describe --dirty --long --always --tags)
if [ $? = 0 ]; then
new_version="$(echo "${VERSION}" | sed 's/-head//')"
# Because the git tag won't yet include the next release we modify the git
# describe output using the version defined from configure.ac.
version="${new_version}-$(echo "${git_version}" | sed 's/^.*-[0-9]\+-//')"
echo "#undef PACKAGE_VERSION"
echo "#define PACKAGE_VERSION \"${version}\""
echo "#define PACKAGE_VERSION \"${git_version}\""
fi
fi