Bug 20072: Fix build-git-snapshot for Debian source format quilt
authorMirko Tietgen <mirko@abunchofthings.net>
Tue, 23 Jan 2018 10:43:10 +0000 (11:43 +0100)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 30 Jan 2018 17:16:45 +0000 (14:16 -0300)
With bug 18696 we need a few tiny changes to build-git-snapshot:
- Debian revision number for debian/changelog
- "orig" in the file name for the tar.gz archive

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

debian/build-git-snapshot

index 1e1505d..260816d 100755 (executable)
@@ -125,6 +125,8 @@ sub latest_sha1 {
 
 sub adjust_debian_changelog {
     my ($newversion) = @_;
+    # debian revision
+    $newversion .= "-1";
 
     sys_command_output( qq{dch --force-distribution -D "$distribution" -v "$newversion" "Building git snapshot."} );
     sys_command_output( qq{dch -r "Building git snapshot."} );
@@ -136,7 +138,7 @@ sub reset_debian_changelog {
 
 sub build_package {
     my ($newversion) = @_;
-    sys_command_output( qq{git archive --format=tar --prefix="koha-$newversion/" HEAD | gzip -9 > "../koha_$newversion.tar.gz"} );
+    sys_command_output( qq{git archive --format=tar --prefix="koha-$newversion/" HEAD | gzip -9 > "../koha_$newversion.orig.tar.gz"} );
 
     my $pdebuildopts = $buildresult ? "--buildresult $buildresult" : "";
     my $pdebuildbasetgz = $basetgz ? "-- --basetgz /var/cache/pbuilder/" . $basetgz . ".tgz" : "";