ploy 0.0.18 → 0.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5443dc061a14e20e77deb046b503a8a46a4daf4e
4
- data.tar.gz: 4b631bb5b42d08a3bffd6168af9c87a7e98db80e
3
+ metadata.gz: 614b0106c907c0c810db0dad6a4a92298bc5f46d
4
+ data.tar.gz: 45dcfa66c86d65800a9ff23456f2b379a2a17a6c
5
5
  SHA512:
6
- metadata.gz: 752d78863fae459cd586a159407b70ab90cebc056822d3258a2ca5fc759d66940c5c0a89706496bf23d915fdf806a0c2411c4a4e6fde42aa93f48805114f1f52
7
- data.tar.gz: eff3d9209e6bd09b13dacbfbedf54def57ed0df30a3caf220d5de1bd8ff11a1a893f827c5e50efd1ef759968a8189787e1648b04279afb92690b74ed1a63f4dc
6
+ metadata.gz: a23a1079453065b1cc5e5c6f2e22cfef5b3526a1700a97e6d9e53f5ef73a36c97394ede0f82f1e74d4a06c19a6894bb3edf67763a05230786de2a463c7b2162b
7
+ data.tar.gz: 4525c8fb9b591fe77fcf395a8d496274e77fb80c719395580dd455ba4fbe954634a8d2405c29201fde9373b20b0c008900fd101496720b7b6eb1d1148d7519bf
@@ -6,9 +6,10 @@ module Ploy
6
6
  class Build < Base
7
7
  def run(argv)
8
8
  config_source = argv.shift || '.ploy-publisher.yml'
9
- config = Ploy::LocalPackage::Config.new config_source
10
- path = config.builder.build_deb
11
- puts "ploy build deb: #{path}"
9
+ Ploy::LocalPackage::Config.load(config_source).each do |config|
10
+ path = config.builder.build_deb
11
+ puts "ploy build deb: #{path}"
12
+ end
12
13
  return true
13
14
  end
14
15
 
@@ -6,12 +6,14 @@ module Ploy
6
6
  class Publish < Base
7
7
  def run(argv)
8
8
  if not is_pull_request_build then
9
- res = Ploy::Publisher.new(argv.shift || '.ploy-publisher.yml').publish
10
- if res then
11
- puts "ploy publish (#{res.deploy_name} #{res.branch} #{res.version}) ok"
9
+ published = Ploy::Publisher.new(argv.shift || '.ploy-publisher.yml').publish
10
+ if published.length > 0 then
11
+ published.each do |res|
12
+ puts "ploy publish (#{res.deploy_name} #{res.branch} #{res.version}) ok"
13
+ end
12
14
  end
13
- puts "debug: git rev-parse: #{`git rev-parse HEAD`.chomp}"
14
- puts "debug: git symbolic-ref: #{`git symbolic-ref -q HEAD |sed -e 's/.*\\///'`.chomp}"
15
+ #puts "debug: git rev-parse: #{`git rev-parse HEAD`.chomp}"
16
+ #puts "debug: git symbolic-ref: #{`git symbolic-ref -q HEAD |sed -e 's/.*\\///'`.chomp}"
15
17
  else
16
18
  puts "skipping publish; this is a PR build"
17
19
  end
@@ -3,13 +3,8 @@ require 'ploy/localpackage/debbuilder'
3
3
  module Ploy
4
4
  module LocalPackage
5
5
  class Config
6
- def initialize(conf_source = '.ploy-publisher.yml')
7
- @conf = conf_source
8
- if (/^---/ =~ conf_source) then
9
- @conf = YAML::load(conf_source)
10
- else
11
- @conf = YAML::load_file(conf_source)
12
- end
6
+ def initialize(conf)
7
+ @conf = conf
13
8
  end
14
9
 
15
10
  def builder
@@ -37,6 +32,24 @@ module Ploy
37
32
  )
38
33
  end
39
34
 
35
+ def self.load(conf_source = '.ploy-publisher.yml')
36
+ conf = nil
37
+ if (/^---/ =~ conf_source) then
38
+ conf = YAML::load(conf_source)
39
+ else
40
+ conf = YAML::load_file(conf_source)
41
+ end
42
+ lps = []
43
+ if conf.key? "packages"
44
+ conf['packages'].each do |pkg|
45
+ lps.push(self.new(conf.merge(pkg)))
46
+ end
47
+ else
48
+ lps.push(self.new(conf))
49
+ end
50
+ return lps
51
+ end
52
+
40
53
  private
41
54
  def git_branch
42
55
  return ENV['TRAVIS_BRANCH'] || `git symbolic-ref -q HEAD |sed -e 's/.*\\///'`.chomp
@@ -50,6 +63,7 @@ module Ploy
50
63
  return `git log -1 --pretty=format:"%ct"`
51
64
  end
52
65
 
66
+
53
67
  end
54
68
  end
55
69
  end
@@ -3,15 +3,19 @@ require 'ploy/localpackage/config'
3
3
  module Ploy
4
4
  class Publisher
5
5
  def initialize(conf_source)
6
- @config = Ploy::LocalPackage::Config.new conf_source
6
+ @configs = Ploy::LocalPackage::Config.load(conf_source)
7
7
  end
8
8
 
9
9
  def publish
10
- pkgpath = @config.builder.build_deb
11
- remote_package = @config.remote_package
12
- remote_package.upload(pkgpath)
13
- remote_package.make_current
14
- return remote_package
10
+ remotes = []
11
+ @configs.each do |config|
12
+ pkgpath = config.builder.build_deb
13
+ remote_package = config.remote_package
14
+ remote_package.upload(pkgpath)
15
+ remote_package.make_current
16
+ remotes.push(remote_package)
17
+ end
18
+ return remotes
15
19
  end
16
20
 
17
21
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.18
4
+ version: 0.0.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Bruce
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-25 00:00:00.000000000 Z
11
+ date: 2013-07-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk