commitpkg: ensure we always use the main branch

Signed-off-by: Morten Linderud <foxboron@archlinux.org>
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
This commit is contained in:
Morten Linderud 2020-05-29 23:09:01 +02:00 committed by Levente Polyak
parent 90aba4f84b
commit f4213f9c36
No known key found for this signature in database
GPG Key ID: FC1B547C8D8172C8
1 changed files with 4 additions and 0 deletions

View File

@ -54,6 +54,10 @@ if [[ ! -f PKGBUILD ]]; then
die 'No PKGBUILD file'
fi
if [[ "$(git symbolic-ref --short HEAD)" != main ]]; then
die 'must be run from the main branch'
fi
source=()
# shellcheck source=contrib/makepkg/PKGBUILD.proto
. ./PKGBUILD