Generate a more specific debian version number
authorHenning Rogge <henning.rogge@fkie.fraunhofer.de>
Thu, 11 Feb 2016 11:36:10 +0000 (12:36 +0100)
committerHenning Rogge <henning.rogge@fkie.fraunhofer.de>
Thu, 11 Feb 2016 11:36:10 +0000 (12:36 +0100)
files/create_debian_package.sh
src/olsrd2/debian/changelog

index bba0223..30d40db 100755 (executable)
@@ -30,6 +30,7 @@ fi
 # calculate version and tarball names
 VERSION=`git describe --abbrev=0| sed -e "s/^v//"`
 FULLVERSION=`git describe`
+VERSIONCOUNT=`git rev-list v${VERSION}..HEAD --count`
 
 TARPREFIX=${TARGET}_${VERSION}
 TARBALL=${BUILDDIR}/${TARPREFIX}.orig.tar.gz
@@ -84,7 +85,7 @@ cp -r ${SOURCE}/src/${TARGET}/debian ./
 cp ${SOURCE}/files/default_licence.txt ./debian/copyright
 
 # adapt changelog template
-sed -i -e "s@SHORTVERSION@${VERSION}@" \
+sed -i -e "s@SHORTVERSION@${VERSION}-${VERSIONCOUNT}@" \
        -e "s@FULLVERSION@${FULLVERSION}@" \
        -e "s@DATETIME@`date -R`@" \
        ./debian/changelog
index 0301812..873c14d 100644 (file)
@@ -1,4 +1,4 @@
-olsrd2 (SHORTVERSION-1) UNRELEASED; urgency=medium
+olsrd2 (SHORTVERSION) UNRELEASED; urgency=medium
 
   * Git version FULLVERSION