feature(commitpkg): auto generate .SRCINFO if present

This currently makes .SRCINFO files opt-in and helps to keep the file up
to date if already present.

Signed-off-by: Morten Linderud <foxboron@archlinux.org>
This commit is contained in:
Morten Linderud 2023-05-21 14:20:11 +02:00 committed by Levente Polyak
parent d759eadb50
commit f11cb9018e
No known key found for this signature in database
GPG Key ID: FC1B547C8D8172C8
1 changed files with 8 additions and 0 deletions

View File

@ -173,6 +173,14 @@ done
# check for PKGBUILD standards
check_pkgbuild_validity
# auto generate .SRCINFO if present
if [[ -f .SRCINFO ]]; then
stat_busy 'Generating .SRCINFO'
makepkg --printsrcinfo > .SRCINFO
git add .SRCINFO
stat_done
fi
if [[ -n $(git status --porcelain --untracked-files=no) ]]; then
stat_busy 'Staging files'
for f in $(git ls-files --modified); do