fix(commitpkg): ensure the PKGBUILD is version controlled

Early exit in case the PKGBUILD is not yet properly under version
control, which can happen for freshly initialized repositories.
Furthermore print an appropriate error message including a hint how to
resolve this.

Fixes #154
Fixes #167

Signed-off-by: Christian Heusel <christian@heusel.eu>
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
This commit is contained in:
Christian Heusel 2023-06-14 00:25:03 +02:00 committed by Levente Polyak
parent 5c6e13a672
commit be5f54c95c
No known key found for this signature in database
GPG Key ID: FC1B547C8D8172C8
1 changed files with 1 additions and 1 deletions

View File

@ -111,7 +111,7 @@ if (( ${#validpgpkeys[@]} != 0 )); then
fi
# find files which should be under source control
needsversioning=()
needsversioning=(PKGBUILD)
for s in "${source[@]}"; do
[[ $s != *://* ]] && needsversioning+=("$s")
done