diff options
author | Lars Wirzenius <liw@liw.fi> | 2013-07-22 12:16:26 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2013-07-22 12:16:26 +0100 |
commit | c6327fe13fdde19156f5ca6aff8727ce2c760dce (patch) | |
tree | 433b63a518f1b81704bc70260c1d532f4b37314a /jenkinstool | |
parent | 4006673b79c876e6b13c0b3630351b6c8278a418 (diff) | |
download | jenkinstool-c6327fe13fdde19156f5ca6aff8727ce2c760dce.tar.gz |
Stupid jenkins
Diffstat (limited to 'jenkinstool')
-rwxr-xr-x | jenkinstool | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/jenkinstool b/jenkinstool index ea70d2b..b2fa6de 100755 --- a/jenkinstool +++ b/jenkinstool @@ -108,7 +108,8 @@ is_release() fi elif [ -d .git ] then - case $(git name-rev --tags --name-only HEAD) in + local output="$(git name-rev --tags --name-only HEAD)" + case "$output" in "${project}-${version}^0") return 0 ;; # annotated tag "${project}-${version}") return 0 ;; # plain tag *) return 1 ;; @@ -171,6 +172,7 @@ then exit 1 ;; esac + basetgz="$pbuilder_release_tgz" debian_dist="%(host.debian-dist)s" if [ "$debian_dist" != unstable ] @@ -189,12 +191,14 @@ then lib*) subdir=$(echo "$sourcepkg" | cut -c1-4) ;; *) subdir=$(echo "$sourcepkg" | cut -c1) ;; esac - poolurl="%(global.artifacts-url)s/debian/pool/main/$subdir/$sourcepkg" + poolpath="pool/main/$subdir/$sourcepkg" + poolurl="%(global.artifacts-url)s/debian/$poolpath" origtgz="${sourcepkg}_${version}.orig.tar.gz" changes="${sourcepkg}_${debianversion}_source.changes" dsc="${sourcepkg}_$debianversion.dsc" dsc_url="$poolurl/$dsc" + debian_dsc_url="http://cdn.debian.net/debian/$poolpath/$dsc" archany_changes="${sourcepkg}_${debianversion}_%(host.arch)s.changes" archall_changes="${sourcepkg}_${debianversion}_all.changes" fi @@ -565,6 +569,11 @@ then echo "$dsc_url already exists, not rebuilding" exit 0 fi +if url_exists "$debian_dsc_url" +then + echo "$debian_dsc_url already exists, not rebuilding" + exit 0 +fi wget -O "../$origtgz" "$project_url/$tarball" @@ -647,6 +656,14 @@ then echo "$poolurl/$archall_changes exists, not rebuilding" exit 0 fi +# We can just check for .dsc on Debian mirrors: if the source package +# exists, the .deb will also exist. This saves us from having to +# figure out the binary package names. +if url_exists "$debian_dsc_url" +then + echo "$debian_dsc_url exists, not rebuilding" + exit 0 +fi binopt=-b ''' else: @@ -661,6 +678,14 @@ then echo "$poolurl/$archany_changes exists, not rebuilding" exit 0 fi +# We can just check for .dsc on Debian mirrors: if the source package +# exists, the .deb will also exist. This saves us from having to +# figure out the binary package names. +if url_exists "$debian_dsc_url" +then + echo "$debian_dsc_url exists, not rebuilding" + exit 0 +fi binopt=-B ''' |