From fe833fdfcb466ab460a76123b078a0e778cf924c Mon Sep 17 00:00:00 2001
From: Darko Poljak <foss@ungleich.com>
Date: Fri, 3 May 2019 21:46:17 +0200
Subject: [PATCH] Sign git tag as one of the last steps

If it fails then the whole release should not fail,
signing git tag can be tried again.
---
 bin/build-helper         | 10 +++++-----
 bin/build-helper.freebsd | 10 +++++-----
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/bin/build-helper b/bin/build-helper
index d72c6cab..53dbf5da 100755
--- a/bin/build-helper
+++ b/bin/build-helper
@@ -313,11 +313,6 @@ eof
         # Tag the current commit
         "$0" release-git-tag
 
-        # sign git tag
-        printf "Enter upstream repository authentication token: "
-        read token
-        "$0" sign-git-release "${target_version}" "${token}"
-
         # Also merge back the version branch
         if [ "$masterbranch" = yes ]; then
             git checkout master
@@ -343,6 +338,11 @@ eof
         # Archlinux release is based on pypi
         make archlinux-release
 
+        # sign git tag
+        printf "Enter upstream repository authentication token: "
+        read token
+        "$0" sign-git-release "${target_version}" "${token}"
+
         # Announce change on ML
         make ml-release
 
diff --git a/bin/build-helper.freebsd b/bin/build-helper.freebsd
index 4f393cb0..f3d1fca1 100755
--- a/bin/build-helper.freebsd
+++ b/bin/build-helper.freebsd
@@ -347,11 +347,6 @@ eof
         # Tag the current commit
         "$0" release-git-tag
 
-        # sign git tag
-        printf "Enter upstream repository authentication token: "
-        read token
-        "$0" sign-git-release "${target_version}" "${token}"
-
         # Also merge back the version branch
         if [ "$masterbranch" = yes ]; then
             git checkout master
@@ -393,6 +388,11 @@ eof
             ;;
         esac
 
+        # sign git tag
+        printf "Enter upstream repository authentication token: "
+        read token
+        "$0" sign-git-release "${target_version}" "${token}"
+
         # Announce change on ML
         make helper=${helper} WEBDIR=${WEBDIR} ml-release
     ;;