[SCM] ci-tooling packaging branch, master, updated. e02d4d13a1b01d60b1a49736bae5ce629721808a

Rohan Garg rohangarg-guest at moszumanska.debian.org
Thu Jan 14 16:18:43 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/ci-tooling.git;a=commitdiff;h=e02d4d1

The following commit has been merged in the master branch:
commit e02d4d13a1b01d60b1a49736bae5ce629721808a
Author: Rohan Garg <rohan at garg.io>
Date:   Thu Jan 14 17:18:12 2016 +0100

    Update pangea_dput with a option to open a gateway via a URI
---
 bin/pangea_dput | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/bin/pangea_dput b/bin/pangea_dput
index e35dd58..7180f3e 100755
--- a/bin/pangea_dput
+++ b/bin/pangea_dput
@@ -11,6 +11,7 @@ options = OpenStruct.new
 options.host = 'localhost'
 options.port = '9090'
 options.repo = nil
+options.gateway = nil
 
 parser = OptionParser.new do |opts|
   opts.banner = "Usage: #{opts.program_name} [options] CHANGESFILE"
@@ -26,11 +27,24 @@ parser = OptionParser.new do |opts|
   opts.on('-r', '--repo REPO', 'target repo name') do |v|
     options.repo = v
   end
+
+  opts.on('-g', '--gateway URI', 'open gateway to remote') do |v|
+    options.gateway = v
+  end
 end
 parser.parse!
 
 abort parser.help if ARGV.empty? || options.repo.nil?
 
+case options.gateway.scheme
+when 'ssh'
+  gateway = Net::SSH::Gateway.new(options.gateway.host, options.gateway.user)
+  gateway.open('localhost', options.port, options.port)
+when nil
+else
+  abort 'Gateway scheme not supported'
+end
+
 Aptly.configure do |config|
   config.host = options.host
   config.port = options.port

-- 
ci-tooling packaging



More information about the pkg-kde-commits mailing list