You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by va...@apache.org on 2013/10/01 18:51:22 UTC

[2/3] git commit: remove our GPG signing code in favor of the one that is now shipped with Buildr.

remove our GPG signing code in favor of the one that is now shipped with Buildr.


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

Branch: refs/heads/ode-1.3.6.x
Commit: 6535d0024f6c01272b240c30d3620ec133d6755c
Parents: 49dbc3b
Author: Tammo van Lessen <tv...@gmail.com>
Authored: Tue Oct 1 18:50:21 2013 +0200
Committer: Tammo van Lessen <tv...@gmail.com>
Committed: Tue Oct 1 18:50:21 2013 +0200

----------------------------------------------------------------------
 Rakefile       |  8 +-------
 tasks/gpg.rake | 59 -----------------------------------------------------
 2 files changed, 1 insertion(+), 66 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ode/blob/6535d002/Rakefile
----------------------------------------------------------------------
diff --git a/Rakefile b/Rakefile
index d777aa5..a7fb21c 100644
--- a/Rakefile
+++ b/Rakefile
@@ -21,6 +21,7 @@ require "buildr/openjpa"
 require "buildr/javacc"
 require "buildr/jetty"
 require "buildr/hibernate"
+require "buildr/gpg"
 
 require File.join(File.dirname(__FILE__), 'repositories.rb')
 require File.join(File.dirname(__FILE__), 'dependencies.rb')
@@ -632,16 +633,11 @@ define "ode" do
   package_with_sources :except => ["jbi-karaf-examples:helloworld2-osgi", "jbi-karaf-examples:ping-pong-osgi"]
   package_with_javadoc :except => ["jbi-karaf-examples:helloworld2-osgi", "jbi-karaf-examples:ping-pong-osgi"] unless ENV["JAVADOC"] =~ /^(no|off|false|skip)$/i
 
-  # sign artifacts
-  gpg_sign_before_upload
-
-
 
   task :aligndeps do
     pp transitive(['org.apache.axis2:axis2-webapp:jar:1.5.6', 'org.apache.rampart:rampart-project:jar:1.5.2']).group_by {|s| "#{s.group}:#{s.id}:#{s.classifier}:#{s.type}" }.map {|i,v| v.sort_by(&:version).first.to_spec}.sort
   end
 
-
 end
 
 define "apache-ode" do
@@ -733,6 +729,4 @@ define "apache-ode" do
   package(:zip, :id=>"#{id}-docs").include(doc.from(project("ode").projects).
     using(:javadoc, :windowtitle=>"Apache ODE #{project.version}").target, :as=>"#{id}-docs-#{version}") unless ENV["JAVADOC"] =~ /^(no|off|false|skip)$/i
 
-  # sign packages
-  gpg_sign_before_upload
 end

http://git-wip-us.apache.org/repos/asf/ode/blob/6535d002/tasks/gpg.rake
----------------------------------------------------------------------
diff --git a/tasks/gpg.rake b/tasks/gpg.rake
deleted file mode 100644
index 0b31222..0000000
--- a/tasks/gpg.rake
+++ /dev/null
@@ -1,59 +0,0 @@
-#
-#    Licensed to the Apache Software Foundation (ASF) under one or more
-#    contributor license agreements.  See the NOTICE file distributed with
-#    this work for additional information regarding copyright ownership.
-#    The ASF licenses this file to You under the Apache License, Version 2.0
-#    (the "License"); you may not use this file except in compliance with
-#    the License.  You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-module Buildr
-  module GPG
-    extend self
-
-    def sign_task(pkg)
-      file(pkg.to_s + '.asc') do
-        puts "GPG signing #{pkg.to_spec}"
-        cmd = 'gpg',
-               '--local-user', ENV['GPG_USER'],
-               '--armor',
-               '--output', pkg.to_s + '.asc'
-        cmd += ['--passphrase', ENV['GPG_PASS']] if ENV['GPG_PASS']
-        cmd += ['--detach-sig', pkg]
-        #cmd << { :verbose => true }
-        #sh *cmd
-        system *cmd
-      end
-    end
-
-    def sign_and_upload(pkg)
-      task(:upload).enhance do
-        artifact = Buildr.artifact(pkg.to_spec_hash.merge(:type => "#{pkg.type}.asc"))
-        artifact.from sign_task(pkg)
-        artifact.invoke
-        artifact.upload
-      end
-    end
-
-    def gpg_sign_before_upload
-      self.enhance do 
-        [self, self.projects].flatten.each { |prj|
-          prj.packages.each { |pkg| sign_and_upload(pkg) }
-          prj.packages.map {|pkg| pkg.pom }.uniq.each { |pom| sign_and_upload(pom) }
-        }
-      end
-    end
-  end
-end
-
-class Buildr::Project
-  include Buildr::GPG
-end