ebm 0.0.34 → 0.0.35
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 +7 -7
- data/lib/commands.rb +2 -0
- data/lib/commands/prune.rb +53 -0
- data/lib/commands/remove_merged_branches.rb +60 -0
- data/lib/commands/version.rb +0 -1
- data/lib/ebm.rb +7 -4
- data/lib/info.rb +2 -2
- metadata +66 -55
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
|
4
|
-
|
5
|
-
SHA512:
|
6
|
-
|
7
|
-
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 45fae87b7c177cd761ba24301d0122fee2cb12ef
|
4
|
+
data.tar.gz: a18668eeea450ba475337bc90c22064ea528f8c1
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a9c96ae05d4ca446d9bc8ad634ec1e9c29a48fde16cd944449be26bde84d76217a15fb09261d31c802709199d011cd49b958b810df9a3689003d51caab19e71c
|
7
|
+
data.tar.gz: 91d364cec191198fcb72bcb6f9d40abc8ba7ac3ecf00812cccf15ffc35046afff451478092761f7580218556c43e39b825acd156ee34d960e7a87da7d434c6be
|
data/lib/commands.rb
CHANGED
@@ -19,10 +19,12 @@ require "ebmsharedlib/utilities"
|
|
19
19
|
require 'commands/prepare'
|
20
20
|
require 'commands/configs'
|
21
21
|
require 'commands/make_sample'
|
22
|
+
require 'commands/remove_merged_branches'
|
22
23
|
require 'commands/tag'
|
23
24
|
require 'commands/status'
|
24
25
|
require 'commands/periodic'
|
25
26
|
require 'commands/pull'
|
26
27
|
require 'commands/push'
|
28
|
+
require 'commands/prune'
|
27
29
|
require 'commands/commit'
|
28
30
|
require 'commands/version'
|
@@ -0,0 +1,53 @@
|
|
1
|
+
#
|
2
|
+
# Rick Hoiberg
|
3
|
+
#
|
4
|
+
# Copyright 2013, eBay Inc.
|
5
|
+
# All rights reserved.
|
6
|
+
# http://www.ebay.com
|
7
|
+
#
|
8
|
+
module Commands
|
9
|
+
class Prune
|
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: prune"
|
26
|
+
opts.description = "Removes branches in the local repository that no longer exist on origin."
|
27
|
+
end
|
28
|
+
|
29
|
+
def run(global_options)
|
30
|
+
|
31
|
+
# see if we can open the config file - we append the .config suffix
|
32
|
+
# the file is expected to be in JSON format
|
33
|
+
|
34
|
+
# determine config_name by extracting parent of our directory
|
35
|
+
info = EbmSharedLib.get_config_from_top_dir
|
36
|
+
|
37
|
+
# Back up to version parent dir. This directory contains the top level repos.
|
38
|
+
top_dir = Dir.pwd
|
39
|
+
|
40
|
+
repos = info[:repos]
|
41
|
+
repos.each do |repo|
|
42
|
+
if repo[:create_dev_branch]
|
43
|
+
repo_name = EbmSharedLib.get_repo_name(repo[:git_path])
|
44
|
+
repo_path = "#{top_dir}/#{repo_name}"
|
45
|
+
cmd = "git remote prune origin"
|
46
|
+
if EbmSharedLib::CL.do_cmd_result(cmd, repo_path) != 0
|
47
|
+
raise "Git push origin failed for #{repo_name}. Make sure you run the command from within a top level repo directory."
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,60 @@
|
|
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 RemoveMergedBranches
|
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: status"
|
26
|
+
opts.description = "Shows the git status of all repos in the config."
|
27
|
+
opts.on('-n', "--dry-run", "Perform a dry run.") do |v|
|
28
|
+
options[:dry_run] = true
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
|
33
|
+
def run(global_options)
|
34
|
+
|
35
|
+
# see if we can open the config file - we append the .config suffix
|
36
|
+
# the file is expected to be in JSON format
|
37
|
+
|
38
|
+
# determine config_name by extracting parent of our directory
|
39
|
+
info = EbmSharedLib.get_config_from_top_dir
|
40
|
+
dry_run = !!options[:dry_run] ? "--dry-run" : ""
|
41
|
+
|
42
|
+
# Back up to version parent dir. This directory contains the top level repos.
|
43
|
+
# top_dir = File.expand_path("#{Dir.pwd}/..")
|
44
|
+
top_dir = Dir.pwd
|
45
|
+
|
46
|
+
repos = info[:repos]
|
47
|
+
repos.each do |repo|
|
48
|
+
if repo[:create_dev_branch]
|
49
|
+
repo_name = EbmSharedLib.get_repo_name(repo[:git_path])
|
50
|
+
repo_path = "#{top_dir}/#{repo_name}"
|
51
|
+
File.open("#{repo_name}/merged_branches.txt").each do |line|
|
52
|
+
cmd = "git push #{dry_run} origin :#{line}"
|
53
|
+
if EbmSharedLib::CL.do_cmd_result(cmd, repo_path) != 0
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
data/lib/commands/version.rb
CHANGED
data/lib/ebm.rb
CHANGED
@@ -24,8 +24,7 @@ class Ebm
|
|
24
24
|
|
25
25
|
# required options
|
26
26
|
def required_options
|
27
|
-
@required_options ||= Set.new [
|
28
|
-
]
|
27
|
+
@required_options ||= Set.new []
|
29
28
|
end
|
30
29
|
|
31
30
|
# the options that were set
|
@@ -46,10 +45,12 @@ class Ebm
|
|
46
45
|
sub_commands[:prepare] = Commands::Prepare.new
|
47
46
|
sub_commands[:configs] = Commands::Configs.new
|
48
47
|
sub_commands[:make_sample] = Commands::MakeSample.new
|
48
|
+
sub_commands[:remove_merged_branches] = Commands::RemoveMergedBranches.new
|
49
49
|
sub_commands[:tag] = Commands::Tag.new
|
50
50
|
sub_commands[:status] = Commands::Status.new
|
51
51
|
sub_commands[:periodic] = Commands::Periodic.new
|
52
52
|
sub_commands[:pull] = Commands::Pull.new
|
53
|
+
sub_commands[:prune] = Commands::Prune.new
|
53
54
|
sub_commands[:push] = Commands::Push.new
|
54
55
|
sub_commands[:commit] = Commands::Commit.new
|
55
56
|
sub_commands[:version] = Commands::Version.new
|
@@ -157,9 +158,11 @@ class Ebm
|
|
157
158
|
def print_actions
|
158
159
|
cmdtext = "Commands are:"
|
159
160
|
@commands.sort.map do |c, opt|
|
160
|
-
|
161
|
+
puts "inside opt.call loop"
|
161
162
|
desc = opt.call.description
|
162
|
-
|
163
|
+
unless c == "remove_merged_branches"
|
164
|
+
cmdtext << "\n #{c} : #{desc}"
|
165
|
+
end
|
163
166
|
end
|
164
167
|
|
165
168
|
# print aliases
|
data/lib/info.rb
CHANGED
metadata
CHANGED
@@ -1,72 +1,87 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: ebm
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.35
|
5
5
|
platform: ruby
|
6
|
-
authors:
|
6
|
+
authors:
|
7
7
|
- Greg Seitz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
- !ruby/object:Gem::Dependency
|
11
|
+
date: 2013-11-14 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
15
14
|
name: subcommand
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
- !ruby/object:Gem::Version
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
21
19
|
version: 1.0.0
|
22
20
|
type: :runtime
|
23
|
-
version_requirements: *id001
|
24
|
-
- !ruby/object:Gem::Dependency
|
25
|
-
name: json_pure
|
26
21
|
prerelease: false
|
27
|
-
|
28
|
-
requirements:
|
29
|
-
- -
|
30
|
-
- !ruby/object:Gem::Version
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.0.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: json_pure
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
31
33
|
version: 1.5.2
|
32
34
|
type: :runtime
|
33
|
-
version_requirements: *id002
|
34
|
-
- !ruby/object:Gem::Dependency
|
35
|
-
name: ruby-hmac
|
36
35
|
prerelease: false
|
37
|
-
|
38
|
-
requirements:
|
39
|
-
- -
|
40
|
-
- !ruby/object:Gem::Version
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.5.2
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: ruby-hmac
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
41
47
|
version: 0.4.0
|
42
48
|
type: :runtime
|
43
|
-
version_requirements: *id003
|
44
|
-
- !ruby/object:Gem::Dependency
|
45
|
-
name: highline
|
46
49
|
prerelease: false
|
47
|
-
|
48
|
-
requirements:
|
49
|
-
- -
|
50
|
-
- !ruby/object:Gem::Version
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.4.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: highline
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '='
|
60
|
+
- !ruby/object:Gem::Version
|
51
61
|
version: 1.6.12
|
52
62
|
type: :runtime
|
53
|
-
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 1.6.12
|
54
69
|
description: Allows configuration of various build systems for eBay mobile
|
55
70
|
email:
|
56
|
-
executables:
|
71
|
+
executables:
|
57
72
|
- ebm
|
58
73
|
extensions: []
|
59
|
-
|
60
74
|
extra_rdoc_files: []
|
61
|
-
|
62
|
-
files:
|
75
|
+
files:
|
63
76
|
- lib/commands/commit.rb
|
64
77
|
- lib/commands/configs.rb
|
65
78
|
- lib/commands/make_sample.rb
|
66
79
|
- lib/commands/periodic.rb
|
67
80
|
- lib/commands/prepare.rb
|
81
|
+
- lib/commands/prune.rb
|
68
82
|
- lib/commands/pull.rb
|
69
83
|
- lib/commands/push.rb
|
84
|
+
- lib/commands/remove_merged_branches.rb
|
70
85
|
- lib/commands/status.rb
|
71
86
|
- lib/commands/tag.rb
|
72
87
|
- lib/commands/version.rb
|
@@ -81,31 +96,27 @@ files:
|
|
81
96
|
- LICENSE
|
82
97
|
homepage:
|
83
98
|
licenses: []
|
84
|
-
|
85
99
|
metadata: {}
|
86
|
-
|
87
100
|
post_install_message:
|
88
|
-
rdoc_options:
|
101
|
+
rdoc_options:
|
89
102
|
- --charset=UTF-8
|
90
|
-
require_paths:
|
103
|
+
require_paths:
|
91
104
|
- lib
|
92
105
|
- lib/commands
|
93
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
94
|
-
requirements:
|
95
|
-
- -
|
96
|
-
- !ruby/object:Gem::Version
|
97
|
-
version:
|
98
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
99
|
-
requirements:
|
100
|
-
- -
|
101
|
-
- !ruby/object:Gem::Version
|
102
|
-
version:
|
106
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '1.8'
|
111
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
112
|
+
requirements:
|
113
|
+
- - '>='
|
114
|
+
- !ruby/object:Gem::Version
|
115
|
+
version: '1.3'
|
103
116
|
requirements: []
|
104
|
-
|
105
117
|
rubyforge_project:
|
106
118
|
rubygems_version: 2.0.3
|
107
119
|
signing_key:
|
108
120
|
specification_version: 4
|
109
121
|
summary: eBay Mobile build tools
|
110
122
|
test_files: []
|
111
|
-
|