bigkeeper 0.9.15 → 0.9.16

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
  SHA256:
3
- metadata.gz: 07a6a50bde773caacd8472d77d8eace46a204ed3a221a11b608c76f4a7be8950
4
- data.tar.gz: 44f47beb30ed88659c9488fd83062936008703beebd36a439931558af4daf1ff
3
+ metadata.gz: da263f18debfe1f9ac36386c091eb0dea7aa1f5e7c6a2dde143b8b6583c52536
4
+ data.tar.gz: d92eef795e1c90588ff117b98ef47a983ae183befbcb103098003c3ef0635671
5
5
  SHA512:
6
- metadata.gz: fb051c59f2c1a559fc3ed31c17779a4c07e9da11224831e299bc4514be4d1d22ad5eb5e72f3e07543f719a0e85253c4e0a3d9ee0c93cd7dbc2a4f26d5c834c4a
7
- data.tar.gz: d3cab185ee28e86108fca8ebf0d1a25ef718d157f93295cb64f66a84d1bf982ad7c4d76cde7a2dc4ff4fe2ab3ce4bbc3c74ab4f12c2c4459c893d3fce5ecceea
6
+ metadata.gz: 452244ac86bfc7b131d93edbc064152d43fc2a6f94fab0d8ae6275c2b4ff98d18ccb146cd9879896c9b82b0dd39252740e98ebae6faa35d0e0c584a99be553f9
7
+ data.tar.gz: 57a91cdd4ef71533f6805ba6c54a36ff2d0c3b14835e101f4e92b3dd5a6efddacc9e6929a36eef05d8d333da01c707794e8e70e1efb8609fc975faa6ea588073
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bigkeeper (0.9.14)
4
+ bigkeeper (0.9.15)
5
5
  big_resources
6
6
  big_stash (~> 0.1)
7
7
  cocoapods
@@ -41,17 +41,29 @@ module BigKeeper
41
41
  exit
42
42
  end
43
43
 
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
- # end
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.gsub('//',''))
313
+ temp_file.puts(line.sub('//',''))
314
314
  elsif !isBigkeeperScript
315
315
  temp_file.puts(line)
316
316
  end
@@ -1,3 +1,3 @@
1
1
  module BigKeeper
2
- VERSION = "0.9.15"
2
+ VERSION = "0.9.16"
3
3
  end
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.15
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-05 00:00:00.000000000 Z
11
+ date: 2019-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gli