diff options
author | Lars Wirzenius <liw@liw.fi> | 2012-09-27 23:31:06 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2012-09-27 23:31:06 +0100 |
commit | 2d0cf87f0598810dbe5ea95a9ff866251e944157 (patch) | |
tree | 9ce57830ac2e88d392a3c989ca07628240080ac4 /jenkinstool | |
parent | 06a2a46f813a73d1e9427104fb5ffb40ec25709c (diff) | |
download | jenkinstool-2d0cf87f0598810dbe5ea95a9ff866251e944157.tar.gz |
Fix Debian versioning, and decide when to include .orig.tar.gz in upload
Diffstat (limited to 'jenkinstool')
-rwxr-xr-x | jenkinstool | 46 |
1 files changed, 38 insertions, 8 deletions
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) |