Harmonize debian nightly version with print_git_revision

Debian nightlies created with debian/util.sh now have the version set
in the same format as Makefile.am produces.  Unlike Makefile.am,
however, we show the orig packaging date rather than the date of the
latest commit, as the latter could legitimately regress and we need
this to always increment.
This commit is contained in:
Travis Cross 2012-06-22 16:10:47 +00:00
parent ad53499b42
commit b16821944e
1 changed files with 12 additions and 1 deletions

13
debian/util.sh vendored
View File

@ -132,6 +132,17 @@ check_repo_clean () {
|| err "untracked files or build products present"
}
get_last_release_ver () {
grep -m1 -e '^AC_INIT' configure.in \
| cut -d, -f2 \
| sed -e 's/\[//' -e 's/\]//' -e 's/ //g'
}
get_nightly_version () {
local commit="$(git rev-list -n1 --abbrev=10 --abbrev-commit HEAD)"
echo "$(get_last_release_ver)+git~$(date +%Y%m%dT%H%M%SZ)~$commit"
}
create_orig () {
{
set -e
@ -147,7 +158,7 @@ create_orig () {
done
shift $(($OPTIND-1))
[ -z "$uver" ] || [ "$uver" = "nightly" ] \
&& uver="$(cat build/next-release.txt)-n$(date +%Y%m%dT%H%M%SZ)"
&& uver="$(get_nightly_version)"
local treeish="$1" dver="$(mk_dver "$uver")"
local orig="../freeswitch_$dver.orig.tar.xz"
[ -n "$treeish" ] || treeish="HEAD"