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.
|| 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
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"