diff options
author | Xenhat Hex | 2021-12-09 20:06:02 -0500 |
---|---|---|
committer | Xenhat Hex | 2021-12-09 20:06:02 -0500 |
commit | 962ae54ef98cb074d34c70e7df0f0f2ea23ce8d2 (patch) | |
tree | 832cc43f93576eb5b459696d90bf50c62745fb48 | |
parent | 1ad86f5135c89fef4f2d309e41a387f5d8521105 (diff) | |
download | aur-962ae54ef98cb074d34c70e7df0f0f2ea23ce8d2.tar.gz |
Attempt to automate one-off build failures due to the partial nature of makepkg
-rwxr-xr-x | PKGBUILD | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -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() { |