Skip to content

Commit

Permalink
incrementing debian version based on git commit
Browse files Browse the repository at this point in the history
  • Loading branch information
heckj committed Jul 14, 2016
1 parent ec471bb commit 47b9135
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions extra/make-deb.sh
Expand Up @@ -13,6 +13,12 @@ else
BRANCH=${TRAVIS_BRANCH}
fi

# this appends a datestring formatting specifically to be increasing
# based on the last date of the commit in this branch to provide increasing
# DCH version numbers for building debian packages for bintray.
GITCOMMITDATE=$(git show -s --pretty="format:%ci")
DATESTRING=$(date -d "$GITCOMMITDATE" -u +"%Y%m%d%H%M%SZ")

if [ -z "$DEBFULLNAME" ]; then
export DEBFULLNAME=`git log -n 1 --pretty=format:%an`
fi
Expand All @@ -22,7 +28,7 @@ if [ -z "$DEBEMAIL" ]; then
fi

if [ -z "$DEBBRANCH" ]; then
export DEBBRANCH=`echo "${BRANCH}" | sed 's/[\/\_]/-/g'`
export DEBBRANCH=`echo "${BRANCH}-${DATESTRING}" | sed 's/[\/\_]/-/g'`
fi

if [ -z "$DEBPKGVER" ]; then
Expand Down Expand Up @@ -55,6 +61,6 @@ debuild --no-lintian --no-tgz-check -us -uc
popd
if [ ! -d deb ]; then
mkdir deb
fi
fi

cp -a *.deb deb/

0 comments on commit 47b9135

Please sign in to comment.