Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/commitpkg.in
diff options
context:
space:
mode:
authorMorten Linderud <foxboron@archlinux.org>2021-12-25 15:04:32 +0100
committerLevente Polyak <anthraxx@archlinux.org>2022-01-26 21:31:27 +0100
commit95d06e0f6056c3fcff87e048468318389786f0b8 (patch)
tree3cb2105611c39b1c9f7f630bc3089ac091e9c488 /commitpkg.in
parentec16d6e4bd127e5d8b930fe5428ed6fe502a045c (diff)
commitpkg: Split signature check into own loop
This allows us to extend the uploads array without having to duplicate the current signing logic. This doesn't change anything as we still exit on any failed packages. Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
Diffstat (limited to 'commitpkg.in')
-rw-r--r--commitpkg.in26
1 files changed, 14 insertions, 12 deletions
diff --git a/commitpkg.in b/commitpkg.in
index 465ef6b..53b7e9f 100644
--- a/commitpkg.in
+++ b/commitpkg.in
@@ -147,20 +147,22 @@ for _arch in "${arch[@]}"; do
continue 2
fi
uploads+=("$pkgfile")
+ done
+done
- sigfile="${pkgfile}.sig"
- if [[ ! -f $sigfile ]]; then
- msg "Signing package %s..." "${pkgfile}"
- if [[ -n $GPGKEY ]]; then
- SIGNWITHKEY=(-u "${GPGKEY}")
- fi
- gpg --detach-sign --use-agent --no-armor "${SIGNWITHKEY[@]}" "${pkgfile}" || die
- fi
- if ! gpg --verify "$sigfile" "$pkgfile" >/dev/null 2>&1; then
- die "Signature %s is incorrect!" "$sigfile"
+for pkgfile in "${uploads[@]}"; do
+ sigfile="${pkgfile}.sig"
+ if [[ ! -f $sigfile ]]; then
+ msg "Signing package %s..." "${pkgfile}"
+ if [[ -n $GPGKEY ]]; then
+ SIGNWITHKEY=(-u "${GPGKEY}")
fi
- uploads+=("$sigfile")
- done
+ gpg --detach-sign --use-agent --no-armor "${SIGNWITHKEY[@]}" "${pkgfile}" || die
+ fi
+ if ! gpg --verify "$sigfile" "$pkgfile" >/dev/null 2>&1; then
+ die "Signature %s is incorrect!" "$sigfile"
+ fi
+ uploads+=("$sigfile")
done
for _arch in "${arch[@]}"; do