ebm 0.0.29 → 0.0.30
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 +4 -4
- data/lib/commands/prepare.rb +2 -2
- data/lib/commands/pull.rb +18 -1
- data/lib/ebmsharedlib/utilities.rb +2 -3
- data/lib/info.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
data.tar.gz:
|
4
|
-
metadata.gz:
|
3
|
+
data.tar.gz: c0e8930ea69c9089a9fba0cd873282f8928d4cfd
|
4
|
+
metadata.gz: e00edf0f5fa988baf2057b3e16c13dfc528f47f2
|
5
5
|
SHA512:
|
6
|
-
data.tar.gz:
|
7
|
-
metadata.gz:
|
6
|
+
data.tar.gz: c31719d07140f74b34ca90b60bb39ca143147df3ff830aa5ea7769bdd9cb7214332f97421fdb02cfe2d52ad6297fe3aeb536ad7621f89dec42479e9b0e3c155b
|
7
|
+
metadata.gz: a80df46fdd191cde1701061a9dd024cb31c3cfb4d5bcd96a2604dd2c683095a0720d4bc250bb0f792bd5e0d1aa59d76477f5c0cc4cfea43584bfd4c777e0fb15
|
data/lib/commands/prepare.rb
CHANGED
@@ -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] =
|
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 --
|
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["
|
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: #{
|
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
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.
|
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-
|
12
|
+
date: 2013-08-08 00:00:00 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: subcommand
|