buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject svn commit: r1528235 - in /buildr/trunk: CHANGELOG addon/buildr/gpg.rb
Date Tue, 01 Oct 2013 22:34:10 GMT
Author: donaldp
Date: Tue Oct  1 22:34:10 2013
New Revision: 1528235

URL: http://svn.apache.org/r1528235
Log:
Buildr-678 - Improve support for gpg signing artifacts using a single method.

Modified:
    buildr/trunk/CHANGELOG
    buildr/trunk/addon/buildr/gpg.rb

Modified: buildr/trunk/CHANGELOG
URL: http://svn.apache.org/viewvc/buildr/trunk/CHANGELOG?rev=1528235&r1=1528234&r2=1528235&view=diff
==============================================================================
--- buildr/trunk/CHANGELOG (original)
+++ buildr/trunk/CHANGELOG Tue Oct  1 22:34:10 2013
@@ -1,4 +1,6 @@
 1.4.13 (Pending)
+* Added:  BUILDR-678 - Improve support for gpg signing artifacts
+          using a single method.
 * Fixed:  BUILDR-677 - GPG addon hangs when .asc files are still in
           target. Submitted By Tammo van Lessen.
 * Added:  Initial support for data source creation in Intellij IDEA

Modified: buildr/trunk/addon/buildr/gpg.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/addon/buildr/gpg.rb?rev=1528235&r1=1528234&r2=1528235&view=diff
==============================================================================
--- buildr/trunk/addon/buildr/gpg.rb (original)
+++ buildr/trunk/addon/buildr/gpg.rb Tue Oct  1 22:34:10 2013
@@ -29,6 +29,7 @@ module Buildr
       def sign_task(pkg)
         raise "ENV['GPG_USER'] not specified" unless ENV['GPG_USER']
         asc_filename = pkg.to_s + '.asc'
+        return if file(asc_filename).prerequisites.include?(pkg.to_s)
         file(asc_filename => [pkg.to_s]) do
           info "GPG signing #{pkg.to_spec}"
 
@@ -61,14 +62,18 @@ module Buildr
           artifact.upload
         end
       end
+
+      def sign_and_upload_all_packages(project)
+        project.packages.each { |pkg| Buildr::GPG.sign_and_upload(project, pkg) }
+        project.packages.map { |pkg| pkg.pom }.uniq.each { |pom| Buildr::GPG.sign_and_upload(project,
pom) }
+      end
     end
 
     module ProjectExtension
       include Extension
 
       after_define do |project|
-        project.packages.each { |pkg| Buildr::GPG.sign_and_upload(project, pkg) }
-        project.packages.map { |pkg| pkg.pom }.uniq.each { |pom| Buildr::GPG.sign_and_upload(project,
pom) }
+        Buildr::GPG.sign_and_upload_all_packages(project)
       end
     end
   end



Mime
View raw message