Skip to content

Commit

Permalink
Merge pull request #74 from rgacogne/skip-checks
Browse files Browse the repository at this point in the history
specs: Skip the 'check' (test) phase when `BUILDER_SKIP_CHECKS` is set
  • Loading branch information
rgacogne authored Aug 20, 2024
2 parents 512e29b + c1f2e8e commit 5adb8df
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions helpers/build-specs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ function new_rpms {
diff -u /tmp/rpms-before /tmp/rpms-after | tee /tmp/rpms-diff | grep -v '^[+][+]' | grep '^[+]' | sed 's/^[+]//'
}

rpmbuild_options=""
if [ -n "${BUILDER_SKIP_CHECKS}" ]; then
rpmbuild_options="--nocheck"
fi

for spec in "${specs[@]}"; do
echo "==================================================================="
echo "-> $spec"
Expand All @@ -123,12 +128,13 @@ for spec in "${specs[@]}"; do

# Download sources
spectool -g -R "$spec"

# Build the rpm and record which files are new
rpm_file_list > /tmp/rpms-before
# NOTE: source_date_epoch_from_changelog is always overridden by SOURCE_DATE_EPOCH if that is set.
# See https://fossies.org/linux/rpm/build/build.c#l_298
rpmbuild \
${rpmbuild_options} \
--define "_sdistdir /sdist" \
--define "_buildhost reproducible" \
--define "source_date_epoch_from_changelog Y" \
Expand All @@ -147,4 +153,3 @@ for spec in "${specs[@]}"; do
echo "Skipping spec (BUILDER_SKIP or in cache)"
fi
done

0 comments on commit 5adb8df

Please sign in to comment.