ecb 0.0.4 → 0.0.5

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: 0b0513c0466b67b5aff0d3b5f66ecf573b172191
4
- data.tar.gz: aa49cf29f606781081930b1bfbb60041cf6d465d
3
+ metadata.gz: e64e2d23ee870dd1ba39626ed91748549f8168ce
4
+ data.tar.gz: 4cfb0fcf32e0b76ed839010a45f0c1e4f2f65e7c
5
5
  SHA512:
6
- metadata.gz: 7533d88b5c826eb1c8e120a023b8bcd643633ca0cc8b1746c770aeb1790d2ed282a5c85db4b279df8c2c6013beaf92cc1b0d5cc0b82a57114c84e7eb6a7e99fd
7
- data.tar.gz: 14020e66b27dcc2f5608e6f2f09aae42328273ff45e078bd69ff78c74c7eb4bcb9c4aa333b0f7c3e79a1164fc4c58a2c908e8233b9a25dad3f1c35bb73803c2d
6
+ metadata.gz: 0e73e33d5e849679f9f2a13307a0e5cbcdc7ba109b1ac38496ca2da62fc66f6ea884e4d14b523f120f077434af37585764e6a6457f3942fd87f80e321260e728
7
+ data.tar.gz: 4865fbb0808402d85df1532a5b06158801d16fc5b9ff4a23f97e27e368021948c40000afdfea2cef47c782e2d9665a9c7dbc4ba53710041d3a6be90756510818
data/lib/commands.rb CHANGED
@@ -21,3 +21,5 @@ require 'commands/version'
21
21
  require 'commands/xcode_build'
22
22
  require 'commands/randombranch'
23
23
  require 'commands/update_plist'
24
+ require 'commands/shell'
25
+ require 'commands/promote'
@@ -0,0 +1,88 @@
1
+ #
2
+ # Greg Seitz
3
+ #
4
+ # Copyright 2013, eBay Inc.
5
+ # All rights reserved.
6
+ # http://www.ebay.com
7
+ #
8
+ module Commands
9
+ class Promote
10
+
11
+ # holds the options that were passed
12
+ # you can set any initial defaults here
13
+ def options
14
+ @options ||= {
15
+ }
16
+ end
17
+
18
+ # required options
19
+ def required_options
20
+ @required_options ||= Set.new [
21
+ :bundleid,
22
+ :product_key,
23
+ :product_name,
24
+ :device,
25
+ :wiki_key,
26
+ :version,
27
+ :working_directory,
28
+ :fix_versions,
29
+ ]
30
+ end
31
+
32
+ def register(opts, global_options)
33
+ opts.banner = "Usage: promote"
34
+ opts.description = "Used to promote a build to Mobile JIRA."
35
+
36
+ opts.on('-n', "--product-name name", "Required") do |v|
37
+ options[:product_name] = v
38
+ end
39
+ opts.on('-b', "--bundle-indentifer Bundle Identitifer", "Required") do |v|
40
+ options[:bundleid] = v
41
+ end
42
+ opts.on('-p', "--product-key key", "Required") do |v|
43
+ options[:product_key] = v
44
+ end
45
+ opts.on('-d', "--device deviceType", "Required") do |v|
46
+ options[:device] = v
47
+ end
48
+ opts.on('-w', "--wiki-key wiki key", "Required") do |v|
49
+ options[:wiki_key] = v
50
+ end
51
+ opts.on('-v', "--version version", "Required") do |v|
52
+ options[:version] = v
53
+ end
54
+ opts.on('-w', "--working-directory Path to source directory", "Required") do |v|
55
+ options[:working_directory] = v
56
+ end
57
+ opts.on('-f', "--fix-versions version", "Required") do |v|
58
+ options[:fix_versions] = v
59
+ end
60
+ opts.on('-u', "--usenew", "") do |v|
61
+ options[:usenew] = true
62
+ end
63
+ opts.on('-c', "--usecli", "") do |v|
64
+ options[:usecli] = true
65
+ end
66
+ end
67
+
68
+ def run(global_options)
69
+ bundleid = options[:bundleid]
70
+ product_key = options[:product_key]
71
+ product_name = options[:product_name]
72
+ device = options[:device]
73
+ wiki_key = options[:wiki_key]
74
+ version = options[:version]
75
+ working_directory = options[:working_directory]
76
+ fix_versions = options[:fix_versions]
77
+ usenew = options[:usenew]
78
+ usecli = options[:usecli]
79
+ config_repo_url = EcbSharedLib.prepare_config_repo(nil)
80
+ scriptsPath = EcbSharedLib.path_to_scripts(config_repo_url)
81
+ cmd = "./masterpromote.sh --bundleID #{bundleid} --projectKey #{product_key}
82
+ --productName #{product_name} --device #{device} --wikiKey #{wiki_key}
83
+ --version #{version} --wkdir #{working_directory} --fixversions #{fix_versions}
84
+ --usenew --usecli"
85
+ EcbSharedLib::CL.do_cmd(cmd, scriptsPath)
86
+ end
87
+ end
88
+ end
@@ -0,0 +1,37 @@
1
+ #
2
+ # Greg Seitz
3
+ #
4
+ # Copyright 2013, eBay Inc.
5
+ # All rights reserved.
6
+ # http://www.ebay.com
7
+ #
8
+ module Commands
9
+ class Shell
10
+
11
+ # holds the options that were passed
12
+ # you can set any initial defaults here
13
+ def options
14
+ @options ||= {
15
+ }
16
+ end
17
+
18
+ # required options
19
+ def required_options
20
+ @required_options ||= Set.new [
21
+ ]
22
+ end
23
+
24
+ def register(opts, global_options)
25
+ opts.banner = "Usage: shell"
26
+ opts.description = "Test running of a shell script."
27
+ end
28
+
29
+ def run(global_options)
30
+ config_repo_url = EcbSharedLib.prepare_config_repo(nil)
31
+ base = EcbSharedLib.full_config_path(config_repo_url)
32
+ newpath = File.expand_path(File.join(base, "scripts"))
33
+ cmd = "./ecb_test.sh"
34
+ EcbSharedLib::CL.do_cmd(cmd, newpath)
35
+ end
36
+ end
37
+ end
@@ -40,6 +40,10 @@ module Commands
40
40
  end
41
41
  end
42
42
 
43
+ #
44
+ # Getting a plist returned from a mobile provsion file:
45
+ # security cms -D -i eBay_Core_iPad_Enterprise.mobileprovision
46
+ #
43
47
  def run(global_options)
44
48
  build = options[:build]
45
49
  plist = options[:plist]
@@ -48,8 +52,7 @@ module Commands
48
52
  puts ". plist....: " + plist if verbose
49
53
  plist_data = Plist::parse_xml(plist)
50
54
  if (build) then
51
- buildindentifer = "." + build
52
- plist_data["BuildIdentifier"] = buildindentifer
55
+ plist_data["BuildIdentifier"] = build
53
56
  puts ". buildindentifer....: " + buildindentifer if verbose
54
57
  end
55
58
  if (identifier) then
@@ -53,7 +53,7 @@ module Commands
53
53
  configuration = build[:configuration]
54
54
  extra_configs = build[:extra_configs]
55
55
  provisioning_file = build[:provisioning_file]
56
-
56
+
57
57
  if !archivePath.empty? then
58
58
  archive = 'archive'
59
59
  else
@@ -68,7 +68,7 @@ module Commands
68
68
  if !archivePath.empty? then
69
69
  cmd = "xcodebuild -exportArchive -exportFormat IPA -archivePath '#{archivePath}/#{archiveName}' -exportPath '#{archivePath}/#{exportName}' -exportProvisioningProfile '#{provisioning_file}'"
70
70
  if EcbSharedLib::CL.do_cmd_result(cmd, '.') != 0
71
- raise "Xcode Export Arcive failed."
71
+ raise "Xcode Export Archive failed."
72
72
  end
73
73
  end
74
74
  end
@@ -112,6 +112,12 @@ module EcbSharedLib
112
112
  "#{base_config_path(repo_url)}/#{CONFIG_DIR}"
113
113
  end
114
114
 
115
+ # the full config path
116
+ def self.path_to_scripts(repo_url)
117
+ File.expand_path(File.join(EcbSharedLib.full_config_path(repo_url), "scripts"))
118
+ end
119
+
120
+
115
121
  # takes the repo name (shortcut or full url)
116
122
  # and fetches config into appropriate location
117
123
  # returns the full repo_url
data/lib/ecb.rb CHANGED
@@ -47,6 +47,8 @@ class Ecb
47
47
  sub_commands[:randombranch] = Commands::RandomBranch.new
48
48
  sub_commands[:update_plist] = Commands::UpdatePlist.new
49
49
  sub_commands[:xcode_build] = Commands::XcodeBuild.new
50
+ sub_commands[:shell] = Commands::Shell.new
51
+ sub_commands[:promote] = Commands::Promote.new
50
52
  end
51
53
 
52
54
  def setup
data/lib/info.rb CHANGED
@@ -7,6 +7,6 @@
7
7
  #
8
8
  class Info
9
9
  def self.version
10
- "0.0.4"
10
+ "0.0.5"
11
11
  end
12
12
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ecb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rick Hoiberg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-03 00:00:00.000000000 Z
11
+ date: 2014-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: subcommand
@@ -87,7 +87,9 @@ executables:
87
87
  extensions: []
88
88
  extra_rdoc_files: []
89
89
  files:
90
+ - lib/commands/promote.rb
90
91
  - lib/commands/randombranch.rb
92
+ - lib/commands/shell.rb
91
93
  - lib/commands/update_plist.rb
92
94
  - lib/commands/version.rb
93
95
  - lib/commands/xcode_build.rb