ecb 0.0.11 → 0.0.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e189c637c859fdcdf25d15a89f975788c204247c
4
- data.tar.gz: d95cbf74c07fdaffb24d11c6ed53aa5798f82c98
3
+ metadata.gz: f0a7ecd9bcb2fc1e905b9f4677f16c985eddd411
4
+ data.tar.gz: c7e4058e7cd2f52ab0c892bc88ef32a87222d3d1
5
5
  SHA512:
6
- metadata.gz: 04abd064c18d14aacb99a4af79ee27c42d8cea336ba08b0a2a9aa8af9f452ba1f6ecb413510ee1b3207e5e4334b33196c82379ba46aa31c546639f5680da1465
7
- data.tar.gz: e0a0b27af1ba414e54ba608d472735e2eaea1a0c209d401c28a94f17276d5650b6080be4435012fce5d1c0a59b4dc01ac8ac74a76dd2fc3c29b1bb2ccb51aa6f
6
+ metadata.gz: 819a1e112e8f3e0e72c6d6e6e800e789d4cfc195e8955a7fa77840b7b00bbc39faac1abb54db5ac6f363244458b4c8a61603a15c229abdca0cb75ee0e9485a5c
7
+ data.tar.gz: 22cd458bcd4958091849a303c57c5d0f9c711f08e4e3e6a29a0d54fafd21138691ed1e767f12de881db99f6bfa924aee6d3b868b87e6896bca31164cc0995c9c
data/bin/ecb CHANGED
@@ -12,8 +12,6 @@
12
12
  #
13
13
 
14
14
  $:.unshift(File.expand_path(File.join(File.dirname(__FILE__), "..", "lib")))
15
- require 'rubygems'
16
- #require "bundler/setup"
17
15
  require 'ecb'
18
16
 
19
17
  exit_code = Ecb.new.run
@@ -18,6 +18,7 @@ module Commands
18
18
  # required options
19
19
  def required_options
20
20
  @required_options ||= Set.new [
21
+ #:config
21
22
  :bundleid,
22
23
  :product_key,
23
24
  :product_name,
@@ -33,6 +34,12 @@ module Commands
33
34
  opts.banner = "Usage: promote"
34
35
  opts.description = "Used to promote a build to Mobile JIRA."
35
36
 
37
+ =begin
38
+ opts.on('-c', "--config name", "Required - Name of the config we are building from.") do |v|
39
+ options[:config] = v
40
+ end
41
+ =end
42
+
36
43
  opts.on('-n', "--product-name name", "Required") do |v|
37
44
  options[:product_name] = v
38
45
  end
@@ -63,12 +70,22 @@ module Commands
63
70
  opts.on('-u', "--usenew", "") do |v|
64
71
  options[:usenew] = true
65
72
  end
66
- opts.on('-c', "--usecli", "") do |v|
73
+ opts.on('-l', "--usecli", "") do |v|
67
74
  options[:usecli] = true
68
75
  end
69
76
  end
70
77
 
71
78
  def run(global_options)
79
+ =begin
80
+ config_name = options[:config]
81
+ config_repo_url = EcbSharedLib.prepare_config_repo(config_repo)
82
+ info = EcbSharedLib.read_repo_config(config_repo_url, config_name)
83
+ bundleid = info[:bundleid]
84
+ product_key = info[:product_key]
85
+ product_name = info[:product_name]
86
+ device = info[:device]
87
+ wiki_key = info[:wiki_key]
88
+ =end
72
89
  bundleid = options[:bundleid]
73
90
  product_key = options[:product_key]
74
91
  product_name = options[:product_name]
@@ -19,15 +19,15 @@ module Commands
19
19
  # required options
20
20
  def required_options
21
21
  @required_options ||= Set.new [
22
- :plist,
22
+ :config,
23
23
  ]
24
24
  end
25
25
 
26
26
  def register(opts, global_options)
27
27
  opts.banner = "Usage: update_plist"
28
28
  opts.description = "Updates the specified plist."
29
- opts.on('-p', "--plist filename", "Required - Plist file to update") do |v|
30
- options[:plist] = v
29
+ opts.on('-c', "--config name", "Required - Name of the config we are building from.") do |v|
30
+ options[:config] = v
31
31
  end
32
32
  opts.on('-b', "--build number", "Optional - build number used to update plist") do |v|
33
33
  options[:build] = v
@@ -45,21 +45,33 @@ module Commands
45
45
  # security cms -D -i eBay_Core_iPad_Enterprise.mobileprovision
46
46
  #
47
47
  def run(global_options)
48
+ config_name = options[:config]
48
49
  build = options[:build]
49
- plist = options[:plist]
50
+ config_repo_url = EcbSharedLib.prepare_config_repo(nil)
51
+ info = EcbSharedLib.read_repo_config(config_repo_url, config_name)
52
+ info_plist = info[:info_plist]
53
+ #require "byebug"; byebug
54
+ enterprise_info_plist = info[:enterprise_info_plist]
50
55
  identifier = options[:identifier]
51
56
  verbose = options[:verbose]
52
- puts ". plist....: " + plist if verbose
53
- plist_data = Plist::parse_xml(plist)
54
- if (build) then
55
- plist_data["BuildIdentifier"] = build
56
- puts ". buildindentifer....: " + build if verbose
57
+ if (info_plist) then
58
+ puts ". Info plist....: " + info_plist if verbose
59
+ plist_data = Plist::parse_xml(info_plist)
60
+ if (build) then
61
+ plist_data["BuildIdentifier"] = build
62
+ puts ". buildindentifer....: " + build if verbose
63
+ plist_data.save_plist(info_plist)
64
+ end
57
65
  end
58
- if (identifier) then
59
- plist_data["CFBundleIdentifier"] = identifier
60
- puts ". Indentifer....: " + identifier if verbose
66
+ if (enterprise_info_plist) then
67
+ puts ". Info plist....: " + enterprise_info_plist if verbose
68
+ plist_data = Plist::parse_xml(enterprise_info_plist)
69
+ if (build) then
70
+ plist_data["BuildIdentifier"] = build
71
+ puts ". buildindentifer....: " + build if verbose
72
+ plist_data.save_plist(enterprise_info_plist)
73
+ end
61
74
  end
62
- plist_data.save_plist(plist)
63
75
  end
64
76
  end
65
77
  end
@@ -101,6 +101,16 @@ module Commands
101
101
 
102
102
  builds = info[:builds]
103
103
  builds.each do |build|
104
+ info_plist = info[:info_plist]
105
+ enterprise_info_plist = info[:enterprise_info_plist]
106
+ if build[:build_type] == "enterprise" &&
107
+ !info_plist.nil? && !enterprise_info_plist.nil? then
108
+ cmd = "rm #{info_plist}"
109
+ EcbSharedLib::CL.do_cmd(cmd, '.')
110
+ cmd = "mv #{enterprise_info_plist} #{info_plist}"
111
+ EcbSharedLib::CL.do_cmd(cmd, '.')
112
+ end
113
+
104
114
  do_build(build, archivePath)
105
115
  cmd = "git checkout ."
106
116
  EcbSharedLib::CL.do_cmd(cmd, '.')
data/lib/ecb.rb CHANGED
@@ -5,7 +5,6 @@
5
5
  # All rights reserved.
6
6
  # http://www.ebay.com
7
7
  #
8
-
9
8
  require "fileutils"
10
9
  require "pathname"
11
10
  require 'plist'
@@ -124,7 +123,6 @@ class Ecb
124
123
  # track both types of options
125
124
  EcbSharedLib::Options.global_options = options
126
125
  EcbSharedLib::Options.cmd_options = sub_cmd.options
127
-
128
126
  sub_cmd.send("run", options)
129
127
  end
130
128
 
data/lib/info.rb CHANGED
@@ -7,6 +7,6 @@
7
7
  #
8
8
  class Info
9
9
  def self.version
10
- "0.0.11"
10
+ "0.0.12"
11
11
  end
12
12
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ecb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rick Hoiberg