]> granicus.if.org Git - fortune-mod/commitdiff
update the code - to build debian pkg . not tested
authorShlomi Fish <shlomif@shlomifish.org>
Mon, 2 Mar 2020 08:00:24 +0000 (10:00 +0200)
committerShlomi Fish <shlomif@shlomifish.org>
Mon, 2 Mar 2020 08:00:24 +0000 (10:00 +0200)
scripts/debian-packaging/docker-test.pl

index c1a96904c59a4f67a1b64b61ed2611c79cb1b0e2..ed7941ed51e8f2ec30da8dd06f18988fef29bbd1 100644 (file)
@@ -41,27 +41,25 @@ if ( !-e $REPO )
 }
 my $cwd = cwd;
 chdir "./$REPO";
-do_system( { cmd => [ "git", "pull", ] } );
-do_system( { cmd => [ "git", "checkout", "upstream", ] } );
+do_system( { cmd => [ "git", "pull", "--ff-only", ] } );
 chdir $cwd;
 do_system( { cmd => [ 'docker', 'cp', "./$REPO", "$CONTAINER:$REPO", ] } );
 
+my $LOG_FN = "git-buildpackage-log.txt";
+
 # do_system( { cmd => [ 'docker', 'cp', "../scripts", "fcsfed:scripts", ] } );
 my $script = <<"EOSCRIPTTTTTTT";
 set -e -x
-curl 'https://mirrors.fedoraproject.org/mirrorlist?repo=fedora-31&arch=x86_64'
-sudo dnf -y install cmake gcc gcc-c++ git glibc-devel libcmocka-devel make perl-autodie perl-Path-Tiny python3-pip @deps
-sudo pip3 install --prefix=/usr freecell_solver
-pip3 install --user freecell_solver
-mkdir b
-cd b
-perl ../scripts/Tatzer
-make
-FCS_TEST_BUILD=1 perl ../source/run-tests.pl --glob='build*.t'
+sudo apt -y install build-essential cmake git-buildpackage perl
+cd "$REPO"
+git clean -dxf .
+gbp buildpackage 2>&1 | tee ~/"$LOG_FN"
 EOSCRIPTTTTTTT
 
 do_system(
     { cmd => [ 'docker', 'exec', $CONTAINER, 'bash', '-c', $script, ] } );
+do_system( { cmd => [ 'docker', 'cp', "$CONTAINER:$LOG_FN", $LOG_FN, ] } );
+
 do_system( { cmd => [ 'docker', 'stop', $CONTAINER, ] } );
 do_system( { cmd => [ 'docker', 'rm',   $CONTAINER, ] } );