bigkeeper 0.9.15 → 0.9.16
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/Gemfile.lock +1 -1
- data/lib/big_keeper.rb +23 -11
- data/lib/big_keeper/util/bigkeeper_parser.rb +24 -0
- data/lib/big_keeper/util/gradle_file_operator.rb +1 -1
- data/lib/big_keeper/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da263f18debfe1f9ac36386c091eb0dea7aa1f5e7c6a2dde143b8b6583c52536
|
4
|
+
data.tar.gz: d92eef795e1c90588ff117b98ef47a983ae183befbcb103098003c3ef0635671
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 452244ac86bfc7b131d93edbc064152d43fc2a6f94fab0d8ae6275c2b4ff98d18ccb146cd9879896c9b82b0dd39252740e98ebae6faa35d0e0c584a99be553f9
|
7
|
+
data.tar.gz: 57a91cdd4ef71533f6805ba6c54a36ff2d0c3b14835e101f4e92b3dd5a6efddacc9e6929a36eef05d8d333da01c707794e8e70e1efb8609fc975faa6ea588073
|
data/Gemfile.lock
CHANGED
data/lib/big_keeper.rb
CHANGED
@@ -41,17 +41,29 @@ module BigKeeper
|
|
41
41
|
exit
|
42
42
|
end
|
43
43
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
44
|
+
pre do |global_options, command, options, args|
|
45
|
+
LeanCloudLogger.instance.start_log(global_options, args)
|
46
|
+
end
|
47
|
+
|
48
|
+
post do |global_options, command, options, args|
|
49
|
+
is_show_log = true
|
50
|
+
if global_options[:log] == 'true'
|
51
|
+
is_show_log = false
|
52
|
+
end
|
53
|
+
LeanCloudLogger.instance.end_log(true, is_show_log)
|
54
|
+
|
55
|
+
current_cmd = LeanCloudLogger.instance.command
|
56
|
+
|
57
|
+
if BigkeeperParser.post_install_command.keys.include? current_cmd
|
58
|
+
path = global_options[:path]
|
59
|
+
cmd = BigkeeperParser.post_install_command[current_cmd]
|
60
|
+
if path
|
61
|
+
Dir.chdir(path) do
|
62
|
+
system cmd
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
55
67
|
|
56
68
|
feature_and_hotfix_command(GitflowType::FEATURE)
|
57
69
|
|
@@ -40,6 +40,16 @@ module BigKeeper
|
|
40
40
|
yield if block_given?
|
41
41
|
end
|
42
42
|
|
43
|
+
def self.post_install
|
44
|
+
BigkeeperParser.parse_post_install
|
45
|
+
yield if block_given?
|
46
|
+
end
|
47
|
+
|
48
|
+
def self.cmd(key, value)
|
49
|
+
BigkeeperParser.parse_command(key, value)
|
50
|
+
yield if block_given?
|
51
|
+
end
|
52
|
+
|
43
53
|
# Bigkeeper file parser
|
44
54
|
class BigkeeperParser
|
45
55
|
@@config = {}
|
@@ -59,6 +69,8 @@ module BigKeeper
|
|
59
69
|
content.gsub!(/modules\s/, 'BigKeeper::modules ')
|
60
70
|
content.gsub!(/configs\s/, 'BigKeeper::configs ')
|
61
71
|
content.gsub!(/param\s/, 'BigKeeper::param ')
|
72
|
+
content.gsub!(/post_install\s/, 'BigKeeper::post_install ')
|
73
|
+
content.gsub!(/cmd\s/, 'BigKeeper::cmd ')
|
62
74
|
eval content
|
63
75
|
end
|
64
76
|
end
|
@@ -133,6 +145,14 @@ module BigKeeper
|
|
133
145
|
@@config[:configs] = @@config[:configs].merge(key => value)
|
134
146
|
end
|
135
147
|
|
148
|
+
def self.parse_post_install
|
149
|
+
@@config[:post_install] = {}
|
150
|
+
end
|
151
|
+
|
152
|
+
def self.parse_command(key, value)
|
153
|
+
@@config[:post_install] = @@config[:post_install].merge(key => value)
|
154
|
+
end
|
155
|
+
|
136
156
|
def self.version
|
137
157
|
@@config[:version]
|
138
158
|
end
|
@@ -175,6 +195,10 @@ module BigKeeper
|
|
175
195
|
@@config[:source].keys
|
176
196
|
end
|
177
197
|
|
198
|
+
def self.post_install_command
|
199
|
+
@@config[:post_install]
|
200
|
+
end
|
201
|
+
|
178
202
|
def self.global_configs(key)
|
179
203
|
if @@config[:configs] == nil
|
180
204
|
return
|
@@ -310,7 +310,7 @@ module BigKeeper
|
|
310
310
|
elsif line.include?('bigkeeper config backup end')
|
311
311
|
isBigkeeperBackupScript = false
|
312
312
|
elsif isBigkeeperBackupScript
|
313
|
-
temp_file.puts(line.
|
313
|
+
temp_file.puts(line.sub('//',''))
|
314
314
|
elsif !isBigkeeperScript
|
315
315
|
temp_file.puts(line)
|
316
316
|
end
|
data/lib/big_keeper/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bigkeeper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mmoaay
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-09-
|
11
|
+
date: 2019-09-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gli
|