This is an automated email from the ASF dual-hosted git repository.

rskraba pushed a commit to branch branch-1.11
in repository https://gitbox.apache.org/repos/asf/avro.git


The following commit(s) were added to refs/heads/branch-1.11 by this push:
     new 60c0a212b AVRO-3858: Configure the build signing script (#2498)
60c0a212b is described below

commit 60c0a212b26471d033559830ae46fa98c59d2618
Author: Ryan Skraba <[email protected]>
AuthorDate: Tue Sep 19 21:03:06 2023 +0200

    AVRO-3858: Configure the build signing script (#2498)
---
 build.sh | 8 +++++++-
 pom.xml  | 6 ++++++
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/build.sh b/build.sh
index 0bd1e1880..572b4e1cb 100755
--- a/build.sh
+++ b/build.sh
@@ -211,7 +211,13 @@ do
         \! -name '*.asc' \! -name '*.txt' );
       do
         (cd "${f%/*}" && shasum -a 512 "${f##*/}") > "$f.sha512"
-        gpg --passphrase "$password" --armor --output "$f.asc" --detach-sig 
"$f"
+
+        if [ -z "$GPG_LOCAL_USER" ]; then
+          gpg --pinentry-mode loopback --passphrase "$password" --armor 
--output "$f.asc" --detach-sig "$f"
+        else
+          gpg --pinentry-mode loopback --local-user="$GPG_LOCAL_USER" 
--passphrase "$password" --armor --output "$f.asc" --detach-sig "$f"
+        fi
+        
       done
 
       set -x
diff --git a/pom.xml b/pom.xml
index 5cfa9d4d0..8f2a71538 100644
--- a/pom.xml
+++ b/pom.xml
@@ -319,6 +319,12 @@
                 <goals>
                   <goal>sign</goal>
                 </goals>
+                <configuration>
+                  <gpgArguments>
+                    <arg>--pinentry-mode</arg>
+                    <arg>loopback</arg>
+                  </gpgArguments>
+                </configuration>
               </execution>
             </executions>
           </plugin>

Reply via email to