From f4213f9c360c3eb8d93a9365e844e254c47c827a Mon Sep 17 00:00:00 2001 From: Morten Linderud Date: Fri, 29 May 2020 23:09:01 +0200 Subject: commitpkg: ensure we always use the main branch Signed-off-by: Morten Linderud Signed-off-by: Levente Polyak --- src/commitpkg.in | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/commitpkg.in b/src/commitpkg.in index d57b30c..9186378 100644 --- a/src/commitpkg.in +++ b/src/commitpkg.in @@ -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 -- cgit v1.2.3-70-g09d2