From 4f80b185205f56be6f5703b06b3b132c605fee0b Mon Sep 17 00:00:00 2001 From: Shlomi Fish Date: Mon, 2 Mar 2020 10:00:24 +0200 Subject: [PATCH] update the code - to build debian pkg . not tested --- scripts/debian-packaging/docker-test.pl | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/scripts/debian-packaging/docker-test.pl b/scripts/debian-packaging/docker-test.pl index c1a9690..ed7941e 100644 --- a/scripts/debian-packaging/docker-test.pl +++ b/scripts/debian-packaging/docker-test.pl @@ -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, ] } ); -- 2.40.0