From b8cfd9d6affc0f72a82e75a8be5207bb357c76bc Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Wed, 9 Jan 2019 21:11:01 +0100 Subject: [PATCH] show output of git describe as PACKAGE_VERSION also fixes GNUism in sed call --- utils/irssi-version.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/utils/irssi-version.sh b/utils/irssi-version.sh index 1fc6a558..6b3a46e4 100755 --- a/utils/irssi-version.sh +++ b/utils/irssi-version.sh @@ -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