Repository: buildr
Updated Branches:
  refs/heads/master c7f10e6d0 -> be51f535e


Add boolean configuration setting `project.gpg` that can be set to
false via `project.gpg = false` to avoid signing and uploading packages.
This is useful when some projects are not intended for publishing.


Project: http://git-wip-us.apache.org/repos/asf/buildr/repo
Commit: http://git-wip-us.apache.org/repos/asf/buildr/commit/be51f535
Tree: http://git-wip-us.apache.org/repos/asf/buildr/tree/be51f535
Diff: http://git-wip-us.apache.org/repos/asf/buildr/diff/be51f535

Branch: refs/heads/master
Commit: be51f535e0e6688afb747d67f2eb1ce57d501bd4
Parents: c7f10e6
Author: Peter Donald <[email protected]>
Authored: Mon Nov 20 21:59:22 2017 +1100
Committer: Peter Donald <[email protected]>
Committed: Mon Nov 20 21:59:22 2017 +1100

----------------------------------------------------------------------
 CHANGELOG           | 3 +++
 addon/buildr/gpg.rb | 8 +++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/buildr/blob/be51f535/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index 3c3292c..69a1959 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,7 @@
 1.5.4 (Pending)
+* Added:  GPG Addon: Add boolean configuration setting `project.gpg` that can 
be set to false via
+          `project.gpg = false` to avoid signing and uploading packages. This 
is useful when some
+          projects are not intended for publishing.
 * Fixed:  JaCoCo Addon: Projects that have jacoco disabled will no longer 
appear in the JaCoCo reports.
 * Change: JaCoCo Addon: Update JaCoCo version to 0.7.9.
 * Fixed:  BUILDR-733 - Escape classpath entries in the pathing jar manifest. 
Submitted by Glenn Croes.

http://git-wip-us.apache.org/repos/asf/buildr/blob/be51f535/addon/buildr/gpg.rb
----------------------------------------------------------------------
diff --git a/addon/buildr/gpg.rb b/addon/buildr/gpg.rb
index bad061d..45bb645 100644
--- a/addon/buildr/gpg.rb
+++ b/addon/buildr/gpg.rb
@@ -72,8 +72,14 @@ module Buildr
     module ProjectExtension
       include Extension
 
+      attr_writer :gpg
+
+      def gpg?
+        @gpg.nil? ? true : !!@gpg
+      end
+
       after_define do |project|
-        Buildr::GPG.sign_and_upload_all_packages(project)
+        Buildr::GPG.sign_and_upload_all_packages(project) if project.gpg?
       end
     end
   end

Reply via email to