diff --git a/entrypoint.sh b/entrypoint.sh index a8e3693..670396f 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -28,10 +28,12 @@ cd "${INPUT_PKGDIR:-.}" # Assume that if .SRCINFO is missing then it is generated elsewhere. # AUR checks that .SRCINFO exists so a missing file can't go unnoticed. -if [ -f .SRCINFO ] && ! sudo -u builder makepkg --printsrcinfo | diff - .SRCINFO; then +sudo -u builder makepkg --printsrcinfo > .SRCINFO.expected +if [ -f .SRCINFO ] && ! diff -u --color=always .SRCINFO.expected .SRCINFO; then echo "::error file=$FILE,line=$LINENO::Mismatched .SRCINFO. Update with: makepkg --printsrcinfo > .SRCINFO" exit 1 fi +mv .SRCINFO.expected .SRCINFO # Optionally install dependencies from AUR if [ -n "${INPUT_AURDEPS:-}" ]; then