Skip to content

Commit ed4e79a

Browse files
author
MochiOS Team
committed
debug: capture mochios-defaults makepkg output to ::error:: annotations
1 parent 9adbce9 commit ed4e79a

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

‎build.sh‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,15 @@ echo "==> rebuilding mochios-defaults pkg..."
5454
cd "$MOCHIOS_DIR/pkgbuilds/mochios-defaults"
5555
pkgver=$(_get_pkgver PKGBUILD)
5656
tar czf "mochios-defaults-$pkgver.tar.gz" --exclude="mochios-defaults-$pkgver.tar.gz" --exclude='pkg' --exclude='src' mochios-release
57-
sudo -u mochi makepkg -cf --noconfirm
57+
TEMP_LOG=$(mktemp /tmp/makepkg.XXXXXX)
58+
chmod a+r "$TEMP_LOG"
59+
sudo -u mochi makepkg -cf --noconfirm > "$TEMP_LOG" 2>&1 || {
60+
rc=$?
61+
echo "::error::mochios-defaults makepkg failed (exit $rc):"
62+
while IFS= read -r line; do echo "::error::$line"; done < "$TEMP_LOG"
63+
exit $rc
64+
}
65+
rm -f "$TEMP_LOG"
5866
cp "$MOCHIOS_DIR/pkgbuilds/mochios-defaults"/mochios-defaults-[0-9]*.pkg.tar.zst "$REPO_DIR/os/x86_64/"
5967

6068
echo "==> rebuilding mochios-branding pkg..."

0 commit comments

Comments
 (0)