lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r912115 - in /lucene/java/trunk: build.xml common-build.xml
Date Sat, 20 Feb 2010 14:04:01 GMT
Author: uschindler
Date: Sat Feb 20 14:04:01 2010
New Revision: 912115

URL: http://svn.apache.org/viewvc?rev=912115&view=rev
Log:
LUCENE-2267: Add support for gpg signing to build.xml

Modified:
    lucene/java/trunk/build.xml
    lucene/java/trunk/common-build.xml

Modified: lucene/java/trunk/build.xml
URL: http://svn.apache.org/viewvc/lucene/java/trunk/build.xml?rev=912115&r1=912114&r2=912115&view=diff
==============================================================================
--- lucene/java/trunk/build.xml (original)
+++ lucene/java/trunk/build.xml Sat Feb 20 14:04:01 2010
@@ -550,6 +550,48 @@
   </target>
 	
   <!-- ================================================================== -->
+  <!-- support for signing the artifacts using gpg                        -->
+  <!-- ================================================================== -->
+  <target name="clean-dist-signatures">
+    <delete failonerror="false">
+      <fileset dir="${dist.dir}">
+        <include name="**/*.asc"/>
+      </fileset>
+    </delete>
+  </target>
+  
+  <target name="sign-artifacts" depends="clean-dist-signatures">
+    <available property="gpg.input.handler" classname="org.apache.tools.ant.input.SecureInputHandler"
+      value="org.apache.tools.ant.input.SecureInputHandler"/>
+    <!--else:--><property name="gpg.input.handler" value="org.apache.tools.ant.input.DefaultInputHandler"/>
+    <input message="Enter GPG keystore password: >" addproperty="gpg.passphrase">
+      <handler classname="${gpg.input.handler}" />
+    </input>
+    
+    <apply executable="${gpg.exe}" inputstring="${gpg.passphrase}"
+      dest="${dist.dir}" type="file" maxparallel="1" verbose="yes">
+      <arg value="--passphrase-fd"/>
+      <arg value="0"/>
+      <arg value="--batch"/>
+      <arg value="--armor"/>
+      <arg value="--default-key"/>
+      <arg value="${gpg.key}"/>
+      <arg value="--output"/>
+      <targetfile/>
+      <arg value="--detach-sig"/>
+      <srcfile/>
+      
+      <fileset dir="${dist.dir}">
+        <include name="**/*.jar"/>
+        <include name="**/*.zip"/>
+        <include name="**/*.tar.gz"/>
+        <include name="**/*.pom"/>
+      </fileset>
+      <globmapper from="*" to="*.asc"/>
+    </apply>
+  </target>
+
+  <!-- ================================================================== -->
   <!-- Build the JavaCC files into the source tree                        -->
   <!-- ================================================================== -->
   <target name="jjdoc">

Modified: lucene/java/trunk/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/java/trunk/common-build.xml?rev=912115&r1=912114&r2=912115&view=diff
==============================================================================
--- lucene/java/trunk/common-build.xml (original)
+++ lucene/java/trunk/common-build.xml Sat Feb 20 14:04:01 2010
@@ -113,6 +113,9 @@
   <property name="svnversion.exe" value="svnversion" />
   <property name="svn.exe" value="svn" />
   
+  <property name="gpg.exe" value="gpg" />
+  <property name="gpg.key" value="CODE SIGNING KEY" />
+
   <condition property="build-1-5-contrib">
      <equals arg1="1.5" arg2="${ant.java.version}" />
   </condition>



Mime
View raw message