diff --git a/aur-pkgs/build-aur-package.sh b/aur-pkgs/build-aur-package.sh index db3a379b..0c673e6f 100755 --- a/aur-pkgs/build-aur-package.sh +++ b/aur-pkgs/build-aur-package.sh @@ -14,5 +14,10 @@ git clone --depth=1 https://aur.archlinux.org/${1}.git /temp/package PIKAUR_CMD="PKGDEST=/workdir/aur-pkgs pikaur --noconfirm --build-gpgdir /etc/pacman.d/gnupg -S -P /temp/package/PKGBUILD" PIKAUR_RUN=(bash -c "${PIKAUR_CMD}") "${PIKAUR_RUN[@]}" +# if aur package is not successfully built, exit +if [ $? -ne 0 ]; then + echo "Build failed. Stopping..." + exit -1 +fi # remove any epoch (:) in name, replace with -- since not allowed in artifacts find /workdir/aur-pkgs/*.pkg.tar* -type f -name '*:*' -execdir bash -c 'mv "$1" "${1//:/--}"' bash {} \; \ No newline at end of file