]>
jfr.im git - irc/irssi/irssi.git/blob - irssi-version.sh
3 DATE
=`GIT_DIR=$1/.git git log -1 --pretty=format:%ai HEAD`
5 VERSION_DATE
=`echo $DATE | cut -f 1 -d ' ' | tr -d -`
6 VERSION_TIME
=`echo $DATE | cut -f 2 -d ' ' | awk -F: '{printf "%d", $1$2}'`
8 if test -z "$VERSION_DATE"; then
10 echo "**Error**: `basename "$0"` must be run in a git clone, cannot proceed."
14 echo "#define IRSSI_VERSION_DATE $VERSION_DATE"
15 echo "#define IRSSI_VERSION_TIME $VERSION_TIME"
17 if echo "${VERSION}" | grep -q -- -head; then
18 # -head version, get extra details from git if we can
19 git_version
=$(GIT_DIR=$1/.git git describe --dirty --long --always --tags)
21 new_version
="$(echo "${VERSION}" | sed 's/-head//')"
22 # Because the git tag won't yet include the next release we modify the git
23 # describe output using the version defined from configure.ac.
24 version
="${new_version}-$(echo "${git_version}" | sed 's/^.*-[0-9]\+-//')"
25 echo "#undef PACKAGE_VERSION"
26 echo "#define PACKAGE_VERSION \"${version}\""