summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/reproducible_build_arch_pkg.sh45
1 files changed, 23 insertions, 22 deletions
diff --git a/bin/reproducible_build_arch_pkg.sh b/bin/reproducible_build_arch_pkg.sh
index e15b8307..2a96edeb 100755
--- a/bin/reproducible_build_arch_pkg.sh
+++ b/bin/reproducible_build_arch_pkg.sh
@@ -114,12 +114,6 @@ remote_build() {
}
build_rebuild() {
- mkdir b1 b2
- remote_build 1
- # only do the 2nd build if the 1st produced some results
- if [ ! -z "$(ls $TMPDIR/b1/$SRCPACKAGE/*.pkg.tar.xz)" ] ; then
- remote_build 2
- fi
}
#
@@ -182,25 +176,32 @@ if [ -z $SRCPACKAGE ] ; then
exit 0
fi
# build package twice
-build_rebuild
-# run diffoscope on the results
-TIMEOUT="30m"
-DIFFOSCOPE="$(schroot --directory /tmp -c source:jenkins-reproducible-${DBDSUITE}-diffoscope diffoscope -- --version 2>&1)"
-echo "$(date -u) - Running $DIFFOSCOPE now..."
+mkdir b1 b2
+remote_build 1
+# publish log
mkdir -p $BASE/archlinux/$SRCPACKAGE/
cd $TMPDIR/b1/$SRCPACKAGE
cp build1.log $BASE/archlinux/$SRCPACKAGE/
-cd $TMPDIR/b1/$SRCPACKAGE
-[ ! -f build2.log ] || cp build2.log $BASE/archlinux/$SRCPACKAGE/
-cd $TMPDIR/b1/$SRCPACKAGE
-for ARTIFACT in *.pkg.tar.xz ; do
- call_diffoscope $SRCPACKAGE $ARTIFACT
- # publish page
- if [ -f $TMPDIR/$SRCPACKAGE/$ARTIFACT.html ] ; then
- cp $TMPDIR/$SRCPACKAGE/$ARTIFACT.html $BASE/archlinux/$SRCPACKAGE/
- echo "$(date -u) - $REPRODUCIBLE_URL/archlinux/$SRCPACKAGE/$ARTIFACT.html updated."
- fi
-done
+# only do the 2nd build if the 1st produced some results
+if [ ! -z "$(ls $TMPDIR/b1/$SRCPACKAGE/*.pkg.tar.xz)" ] ; then
+ remote_build 2
+ cd $TMPDIR/b2/$SRCPACKAGE
+ cp build2.log $BASE/archlinux/$SRCPACKAGE/
+ # run diffoscope on the results
+ TIMEOUT="30m"
+ DIFFOSCOPE="$(schroot --directory /tmp -c source:jenkins-reproducible-${DBDSUITE}-diffoscope diffoscope -- --version 2>&1)"
+ echo "$(date -u) - Running $DIFFOSCOPE now..."
+ cd $TMPDIR/b1/$SRCPACKAGE
+ for ARTIFACT in *.pkg.tar.xz ; do
+ [ ! -f $ARTIFACT ] || continue
+ call_diffoscope $SRCPACKAGE $ARTIFACT
+ # publish page
+ if [ -f $TMPDIR/$SRCPACKAGE/$ARTIFACT.html ] ; then
+ cp $TMPDIR/$SRCPACKAGE/$ARTIFACT.html $BASE/archlinux/$SRCPACKAGE/
+ echo "$(date -u) - $REPRODUCIBLE_URL/archlinux/$SRCPACKAGE/$ARTIFACT.html updated."
+ fi
+ done
+fi
cd
cleanup_all