diff options
Diffstat (limited to 'irssi-version.sh')
-rwxr-xr-x | irssi-version.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/irssi-version.sh b/irssi-version.sh index 49abc55e..7588182d 100755 --- a/irssi-version.sh +++ b/irssi-version.sh @@ -7,3 +7,15 @@ VERSION_TIME=`echo $DATE | cut -f 2 -d ' ' | awk -F: '{printf "%d", $1$2}'` echo "#define IRSSI_VERSION_DATE $VERSION_DATE" echo "#define IRSSI_VERSION_TIME $VERSION_TIME" + +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 "#define PACKAGE_VERSION \"${version}\"" + fi +fi |