From 2d0cf87f0598810dbe5ea95a9ff866251e944157 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Thu, 27 Sep 2012 23:31:06 +0100 Subject: Fix Debian versioning, and decide when to include .orig.tar.gz in upload --- jenkinstool | 46 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 38 insertions(+), 8 deletions(-) (limited to 'jenkinstool') diff --git a/jenkinstool b/jenkinstool index 4098767..352bb9b 100755 --- a/jenkinstool +++ b/jenkinstool @@ -538,16 +538,46 @@ if url_exists "$dsc_url" then echo "$dsc_url already exists, not rebuilding" exit 0 +fi + +wget -O "../$origtgz" "$project_url/$tarball" + +# Should we include the .orig.tar.gz in the upload? +if ! is_release "$project" "$version" +then + # It's not a release. dpkg-genchanges will do the right thing, so + # we let it. + srcopt=-si +elif [ "$debian_dist" = unstable ] +then + # It's a release, and it's going to Debian unstable. dpkg-genchanges + # will do the right thing. + srcopt=-si else - wget -O "../$origtgz" "$project_url/$tarball" - if ! is_release "$project" "$version" || [ "$debian_dist" != unstable ] - then - dch -v "$debianversion" --distribution "$debian_dist" "CI build" - dch -r '' - fi - debuild -S -us -uc -i - dput -f jenkins "../$changes" + # It's a release, and it's going to code.liw.fi, as a backport-like + # build. We tell dpkg-genchanges to include the source if the Debian + # version is -1.* and otherwise not. + case "$debianversion" in + *-1.*) srcopt=-sa ;; + *) srcopt=-sd ;; + esac +fi + +# Should we modify debian/changelog? We do not do that if it is a +# release build, going to Debian unstable. +if ! is_release "$project" "$version" +then + dch -v "$debianversion" --distribution "$debian_dist" "CI build" + dch -r '' +elif [ "$debian_dist" != unstable ] +then + dch -v "$debianversion" --distribution "$debian_dist" \ + "Release backport build" + dch -r '' fi + +debuild -S $srcopt -us -uc -i +dput -f jenkins "../$changes" ''') self.add_rsync_workspace_from_target(jc) -- cgit v1.2.1