Commit 3406a0a9 authored by anarcat's avatar anarcat

fix auto build version number to reflect upstream changes

otherwise this always looked like 1.1
parent a932237e
......@@ -16,14 +16,21 @@ override_dh_install:
jenkins-build-official:
git-buildpackage -b --git-upstream-branch=origin/upstream --git-debian-branch=origin/debian --git-ignore-branch -kjenkins@ci.aegirproject.org
version=$(shell git describe --match 'debian/*' --tags | sed 's/debian\///;s/-\([0-9]*\)-\([0-9]*\)-/-\1+\2/' )
# the upstream version: strip the 6.x and turn the appendix into
# +N.foo where N is the number of commits since last tag and foo is
# the hash
upstream_version=$(shell git describe --tags origin/6.x-1.x | sed 's/6.x-//;s/-\([0-9]*\)-\([^-]*\)$/+\1.\2/')
# the debian version, strip the debian/ part of the tag and the
# upstream version number, keep just the debian part, replacing as
# above for the N.foo part
debian_version=$(shell git describe --tags origin/debian | sed 's/debian\///;s/-\([0-9]*\)-\([^-]*\)$/+\1.\2/;s/^.*-//' )
# this builds a debian package but first updates the branches to follow the latest 1.x branch
jenkins-build-auto:
-git branch -D tmpdebian
git checkout -b tmpdebian origin/debian
git merge origin/6.x-1.x
dch -v ${version} "automatic jenkins build"
dch -v ${upstream_version}-${debian_version} "automatic jenkins build ${BUILD_TAG}"
git commit -m"dummy commit for $version autobuild" debian/changelog
git-buildpackage -b --git-upstream-branch=origin/6.x-1.x --git-debian-branch=tmpdebian -kjenkins@ci.aegirproject.org
git checkout ${GIT_COMMIT}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment