Skip to content

Commit 7c847c2

Browse files
committed
Merge pull request #244 from dberzano/no-incremental-if-first-failed
No incremental build if the first one failed
2 parents c5f1354 + 5cc54f6 commit 7c847c2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

alibuild_helpers/build_template.sh

+5-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ CACHED_TARBALL=%(cachedTarball)s
9999
if [[ "$CACHED_TARBALL" == "" && ! -f $BUILDROOT/log ]]; then
100100
set -o pipefail
101101
bash -ex "$WORK_DIR/SPECS/$ARCHITECTURE/$PKGNAME/$PKGVERSION-$PKGREVISION/$PKGNAME.sh" 2>&1 | tee "$BUILDROOT/log"
102-
elif [[ "$CACHED_TARBALL" == "" && $INCREMENTAL_BUILD_HASH != "0" ]]; then
102+
elif [[ "$CACHED_TARBALL" == "" && $INCREMENTAL_BUILD_HASH != "0" && -f "$BUILDDIR/.build_succeeded" ]]; then
103103
set -o pipefail
104104
(%(incremental_recipe)s) | tee -a "$BUILDROOT/log"
105105
elif [[ "$CACHED_TARBALL" == "" ]]; then
@@ -190,3 +190,7 @@ ln -snf $PKGVERSION-$PKGREVISION $ARCHITECTURE/$PKGNAME/latest
190190
if [[ $DEVEL_PREFIX ]]; then
191191
ln -snf $PKGVERSION-$PKGREVISION $ARCHITECTURE/$PKGNAME/latest-$DEVEL_PREFIX
192192
fi
193+
194+
# Mark the build as successful with a placeholder. Allows running incremental
195+
# recipe in case the package is in development mode.
196+
touch "$BUILDDIR/.build_succeeded"

0 commit comments

Comments
 (0)