ebm 0.0.29 → 0.0.30

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
- data.tar.gz: 23f00a9b95f4cc9e013b1cabd1dfad0d665aac8e
4
- metadata.gz: 3f9ad29a4e1e1827156bc6875841679fd2e60489
3
+ data.tar.gz: c0e8930ea69c9089a9fba0cd873282f8928d4cfd
4
+ metadata.gz: e00edf0f5fa988baf2057b3e16c13dfc528f47f2
5
5
  SHA512:
6
- data.tar.gz: a67935429ca402a81c00da655aa768da91bd42476d2c55645ca37d27ddc4fcddc72310a03c0b1559dbc2084e0f2f18a74b978b36e65bbb319b54900075b0791e
7
- metadata.gz: fa48e791b33f88046c56976c4453d58458698f57fee8d747c06630342d4934377a367b0d8993a4272c69c0e7bac349b78ccf1e67f70d8c46d55625d2789127f1
6
+ data.tar.gz: c31719d07140f74b34ca90b60bb39ca143147df3ff830aa5ea7769bdd9cb7214332f97421fdb02cfe2d52ad6297fe3aeb536ad7621f89dec42479e9b0e3c155b
7
+ metadata.gz: a80df46fdd191cde1701061a9dd024cb31c3cfb4d5bcd96a2604dd2c683095a0720d4bc250bb0f792bd5e0d1aa59d76477f5c0cc4cfea43584bfd4c777e0fb15
@@ -43,7 +43,7 @@ module Commands
43
43
  end
44
44
 
45
45
  opts.on("--with-local-version", "Also include a local version branch, only applies with the -i option.") do |v|
46
- options[:with_local_version] = v
46
+ options[:with_local_version] = true
47
47
  end
48
48
 
49
49
  end
@@ -154,7 +154,7 @@ module Commands
154
154
  end
155
155
 
156
156
  if (with_local_version && initials.nil?)
157
- raise "Using --with_local_version is only applicable if you are also creating a developer branch -i."
157
+ raise "Using --with-local-version is only applicable if you are also creating a developer branch -i."
158
158
  end
159
159
 
160
160
  # try to make sure the repo is available
data/lib/commands/pull.rb CHANGED
@@ -33,6 +33,10 @@ module Commands
33
33
  options[:remote_version] = true
34
34
  end
35
35
 
36
+ opts.on("--base-version", "Pull from base remote version branch into your current branch.") do |v|
37
+ options[:base_version] = true
38
+ end
39
+
36
40
  opts.on('-n', "--dry-run", "Perform a dry run.") do |v|
37
41
  options[:dry_run] = true
38
42
  end
@@ -45,16 +49,21 @@ module Commands
45
49
  # the file is expected to be in JSON format
46
50
  tag = options[:tag]
47
51
  remote_version = !!options[:remote_version]
52
+ base_version = !!options[:base_version]
48
53
  dry_run = !!options[:dry_run] ? "--dry-run" : ""
49
54
 
50
55
  if ARGV.length > 0
51
56
  raise "You must specify all arguments with their options."
52
57
  end
53
58
 
54
- if (!tag.nil? && remote_version)
59
+ if (!tag.nil? && (remote_version || base_version))
55
60
  raise "You can't specify both a pull from a tag and a pull from a remote version branch together."
56
61
  end
57
62
 
63
+ if (remote_version && base_version)
64
+ raise "You can only specify base-version or remote-version, not both."
65
+ end
66
+
58
67
  # get config based on name of current dir
59
68
  info = EbmSharedLib.get_config_from_top_dir
60
69
 
@@ -67,6 +76,8 @@ module Commands
67
76
  repo_name = EbmSharedLib.get_repo_name(repo[:git_path])
68
77
  repo_path = "#{top_dir}/#{repo_name}"
69
78
  branch = repo[:branch]
79
+ base_branch = repo[:base_branch]
80
+
70
81
  puts("\n#{repo_name} pull:\n");
71
82
 
72
83
  cmd = "git fetch #{dry_run} --all"
@@ -84,6 +95,12 @@ module Commands
84
95
  if remote_version
85
96
  # pulling from remote version branch
86
97
  cmd = "git pull #{dry_run} --no-edit --recurse-submodules=yes origin #{branch}"
98
+ elsif base_version
99
+ # pulling from base remote version branch
100
+ if base_branch.nil?
101
+ raise "You specified base-version but the config has no base_branch."
102
+ end
103
+ cmd = "git pull #{dry_run} --no-edit --recurse-submodules=yes origin #{base_branch}"
87
104
  else
88
105
  # pull from the remote branch of the current branch
89
106
  cmd = "git pull #{dry_run} --no-edit --recurse-submodules=yes"
@@ -15,10 +15,9 @@ module EbmSharedLib
15
15
  # the key is the shortcut used for the config repos
16
16
  CONFIG_REPOS = {
17
17
  "stash" => "https://mobiebay.com/git/scm/ebmconfigs/build_configs.git",
18
- "corp" => "git@github.scm.corp.ebay.com:eBayMobile/build_configs.git",
19
18
  "mobi" => "git@github.mobiebay.com:eBayMobile/build_configs.git",
20
19
  }
21
- CONFIG_REPOS["default"] = CONFIG_REPOS["corp"]
20
+ CONFIG_REPOS["default"] = CONFIG_REPOS["mobi"]
22
21
 
23
22
  class CL
24
23
  # run a command line and echo to console
@@ -134,7 +133,7 @@ module EbmSharedLib
134
133
  info = JSON.parse(json)
135
134
  info.recursively_symbolize_keys!
136
135
  rescue
137
- msg = err_msg.nil? ? "Error opening config file JSON: #{config_path}" : err_msg
136
+ msg = err_msg.nil? ? "Error opening config file JSON: #{file_path}" : err_msg
138
137
  raise msg
139
138
  end
140
139
  end
data/lib/info.rb CHANGED
@@ -7,6 +7,6 @@
7
7
  #
8
8
  class Info
9
9
  def self.version
10
- "0.0.29"
10
+ "0.0.30"
11
11
  end
12
12
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ebm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.29
4
+ version: 0.0.30
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Seitz
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2013-08-05 00:00:00 Z
12
+ date: 2013-08-08 00:00:00 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: subcommand