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

schultz pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit d50087c5f71951ca3f5c45821fd2258f14c0fc45
Author: Christopher Schultz <ch...@christopherschultz.net>
AuthorDate: Fri Sep 29 11:07:41 2023 -0400

    Check GPG viability without actually creating a file.
---
 build.xml | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/build.xml b/build.xml
index 14ffd3ac1a..723be26ac5 100644
--- a/build.xml
+++ b/build.xml
@@ -2474,13 +2474,21 @@ asf.ldap.username=${release.asfusername}
 
   <!-- Test GPG by signing build.xml as a sample file. -->
   <target name="gpg-init-3" if="gpg.passphrase">
-    <delete file="build.xml.asc" quiet="true" />
-    <antcall target="sign">
-      <param name="file" value="build.xml" />
-    </antcall>
-    <uptodate srcfile="build.xml" targetfile="build.xml.asc" 
property="gpg.success" />
-    <delete file="build.xml.asc" quiet="true" />
-    <fail unless="gpg.success" />
+    <exec executable="${gpg.exec}"
+          inputstring="${gpg.passphrase}"
+          failonerror="true"
+          discardOutput="true"
+          logError="true">
+      <arg value="--batch"/>
+      <arg value="--pinentry-mode"/>
+      <arg value="loopback"/>
+      <arg value="--passphrase-fd"/>
+      <arg value="0"/>
+      <arg value="-o" /><!-- write to stdout -->
+      <arg value="-" />
+      <arg value="--detach-sign"/>
+      <arg value="build.xml"/>
+    </exec>
   </target>
 
   <!-- Packages the core zip distro -->


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to