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

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

commit 1d37655d3873490b0e149b0ed53408880be08a30
Author: Christopher Schultz <ch...@christopherschultz.net>
AuthorDate: Fri Sep 29 08:39:15 2023 -0400

    Perform a simple gpg test at the beginning of the build to ensure that GPG 
will work later.
---
 build.xml | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/build.xml b/build.xml
index 796f33bbc4..f2f1cc8d00 100644
--- a/build.xml
+++ b/build.xml
@@ -2746,7 +2746,7 @@ asf.ldap.username=${release.asfusername}
   </target>
 
   <!-- Sets properties only required for releases -->
-  <target name="release-init" depends="gpg-init-1,gpg-init-2,compile" >
+  <target name="release-init" 
depends="gpg-init-1,gpg-init-2,gpg-init-3,compile" >
     <taskdef name="forceUtcTimeZone"
              classname="org.apache.tomcat.buildutil.ForceUtcTimeZone"
              classpath="${tomcat.classes}" />
@@ -2758,9 +2758,21 @@ asf.ldap.username=${release.asfusername}
   </target>
 
   <target name="gpg-init-2" if="${gpg.exec.available}">
-    <input message="Enter GPG pass-phrase" addproperty="gpg.passphrase" >
-      <handler type="secure"/>
-    </input>
+<echo>gpg.exec.available=${gpg.exec.available}</echo>
+<echo>gpg.exec=${gpg.exec}</echo>
+    <input addproperty="gpg.passphrase"><handler type="secure"/>Enter GPG 
passphrase
+</input>
+  </target>
+
+  <!-- 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" />
   </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