From 8cfcf0727c5936f8d7d1a70438458ea53ada7178 Mon Sep 17 00:00:00 2001 From: Jeremy Rand Date: Tue, 6 Apr 2021 11:41:32 +0000 Subject: [PATCH] Cirrus: Skip showconf on download task Fixes https://github.com/namecoin/ncdns-repro/issues/106 --- tools/cirrus_build_project.sh | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/tools/cirrus_build_project.sh b/tools/cirrus_build_project.sh index 91fc2d0..d898616 100755 --- a/tools/cirrus_build_project.sh +++ b/tools/cirrus_build_project.sh @@ -48,20 +48,22 @@ echo "Unpacking git cache..." if [[ "$PROJECT" == "release" ]]; then echo "release project is never cached." else - echo "Checking if project is cached..." - OUTDIR="$(./rbm/rbm showconf $PROJECT output_dir --target $CHANNEL --target ncdns-$OS-$ARCH)" - OUTFILE="$(./rbm/rbm showconf $PROJECT filename --target $CHANNEL --target ncdns-$OS-$ARCH)" - - if [[ "$SHOULD_BUILD" -eq 0 ]]; then - echo "Cleaning old outputs..." - ./tools/clean-old - fi - - if [[ -e "$OUTDIR/$OUTFILE" ]]; then - echo "Project cache hit, skipping build." - SHOULD_BUILD=0 + if [[ "$SHOULD_BUILD" -eq 1 ]]; then + echo "Checking if project is cached..." + OUTDIR="$(./rbm/rbm showconf $PROJECT output_dir --target $CHANNEL --target ncdns-$OS-$ARCH)" + OUTFILE="$(./rbm/rbm showconf $PROJECT filename --target $CHANNEL --target ncdns-$OS-$ARCH)" + + if [[ -e "$OUTDIR/$OUTFILE" ]]; then + echo "Project cache hit, skipping build." + SHOULD_BUILD=0 + else + echo "Project cache miss, proceeding with build." + fi else - echo "Project cache miss, proceeding with build." + if [[ "$SHOULD_BUILD" -eq 0 ]]; then + echo "Cleaning old outputs..." + ./tools/clean-old + fi fi fi