Skip to content

Commit

Permalink
Build failure test. (#873)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenx-dust authored Mar 12, 2024
1 parent 51eb0ba commit 428722b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions aur-pkgs/build-aur-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 {} \;

0 comments on commit 428722b

Please sign in to comment.