diff options
author | Morten Linderud <foxboron@archlinux.org> | 2020-05-29 23:09:01 +0200 |
---|---|---|
committer | Levente Polyak <anthraxx@archlinux.org> | 2023-03-19 22:02:04 +0100 |
commit | f4213f9c360c3eb8d93a9365e844e254c47c827a (patch) | |
tree | 4aff87315c8859daa1b92d2697028b33fb43afc7 | |
parent | 90aba4f84b001bc2063b104d93a1e43810c22cbb (diff) | |
download | devtools-f4213f9c360c3eb8d93a9365e844e254c47c827a.tar.xz |
commitpkg: ensure we always use the main branch
Signed-off-by: Morten Linderud <foxboron@archlinux.org>
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
-rw-r--r-- | src/commitpkg.in | 4 |
1 files changed, 4 insertions, 0 deletions
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 |