summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorXenhat Hex2021-12-09 20:06:02 -0500
committerXenhat Hex2021-12-09 20:06:02 -0500
commit962ae54ef98cb074d34c70e7df0f0f2ea23ce8d2 (patch)
tree832cc43f93576eb5b459696d90bf50c62745fb48
parent1ad86f5135c89fef4f2d309e41a387f5d8521105 (diff)
downloadaur-962ae54ef98cb074d34c70e7df0f0f2ea23ce8d2.tar.gz
Attempt to automate one-off build failures due to the partial nature of makepkg
-rwxr-xr-xPKGBUILD15
1 files changed, 13 insertions, 2 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 4650b2bd71dd..88be8e658f1c 100755
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -64,8 +64,19 @@ build() {
pip3 install --upgrade autobuild -i https://git.alchemyviewer.org/api/v4/projects/54/packages/pypi/simple --extra-index-url https://pypi.org/simple
autobuild configure -A 64 -c ReleaseOS -- -DLL_TESTS:BOOL=OFF -DDISABLE_FATAL_WARNINGS=ON -DUSE_LTO:BOOL=ON -DVIEWER_CHANNEL="Alchemy Test"
- cd "build-linux-64" || exit 1
- ninja -j$(nproc)
+ cd "build-linux-64" || exit 1
+ if ninja -j"$(nproc)"; then
+ echo "Build successful."
+ else
+ echo "Build failed. Cleaning and trying again for you..."
+ echo "Cleaning build folder..."
+ rm -rf "${pkgname}/build-linux-64"
+ if ninja -j"$(nproc)"; then
+ echo "Build succeeded after 2 tries"
+ else
+ echo "Build failed twice. Will not try again."
+ fi
+ fi
}
package() {