diff --git a/Gemfile.lock b/Gemfile.lock index 92f8f9e..57824d4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - bigkeeper (0.9.15) + bigkeeper (0.9.17) big_resources big_stash (~> 0.1) cocoapods diff --git a/lib/big_keeper.rb b/lib/big_keeper.rb index d191a86..f54b941 100644 --- a/lib/big_keeper.rb +++ b/lib/big_keeper.rb @@ -51,18 +51,6 @@ module BigKeeper is_show_log = false end LeanCloudLogger.instance.end_log(true, is_show_log) - - current_cmd = LeanCloudLogger.instance.command - - if BigkeeperParser.post_install_command.keys.include? current_cmd - path = global_options[:path] - cmd = BigkeeperParser.post_install_command[current_cmd] - if path - Dir.chdir(path) do - system cmd - end - end - end end feature_and_hotfix_command(GitflowType::FEATURE) diff --git a/lib/big_keeper/command/feature&hotfix/publish.rb b/lib/big_keeper/command/feature&hotfix/publish.rb index 7b362ff..4d4289b 100644 --- a/lib/big_keeper/command/feature&hotfix/publish.rb +++ b/lib/big_keeper/command/feature&hotfix/publish.rb @@ -50,7 +50,19 @@ def self.publish(path, user, type) # Rebase Home GitService.new.verify_rebase(path, GitflowType.base_branch(type), 'Home') - `open #{BigkeeperParser.home_pulls()}` + current_cmd = LeanCloudLogger.instance.command + cmds = BigkeeperParser.post_install_command + + if cmds && (cmds.keys.include? current_cmd) + cmd = BigkeeperParser.post_install_command[current_cmd] + if path + Dir.chdir(path) do + system cmd + end + end + else + `open #{BigkeeperParser.home_pulls()}` + end ensure end end diff --git a/lib/big_keeper/service/module_service.rb b/lib/big_keeper/service/module_service.rb index 3984b80..d91faec 100644 --- a/lib/big_keeper/service/module_service.rb +++ b/lib/big_keeper/service/module_service.rb @@ -87,7 +87,19 @@ def publish(path, user, module_name, home_branch_name, type) module_full_path = BigkeeperParser.module_full_path(path, user, module_name) GitService.new.verify_push(module_full_path, "publish branch #{home_branch_name}", home_branch_name, module_name) - `open #{BigkeeperParser.module_pulls(module_name)}` + current_cmd = LeanCloudLogger.instance.command + cmds = BigkeeperParser.post_install_command + + if cmds && (cmds.keys.include? current_cmd) + cmd = BigkeeperParser.post_install_command[current_cmd] + if module_full_path + Dir.chdir(module_full_path) do + system cmd + end + end + else + `open #{BigkeeperParser.module_pulls(module_name)}` + end ModuleCacheOperator.new(path).del_git_module(module_name) end diff --git a/lib/big_keeper/version.rb b/lib/big_keeper/version.rb index 8de290e..b4e65de 100644 --- a/lib/big_keeper/version.rb +++ b/lib/big_keeper/version.rb @@ -1,3 +1,3 @@ module BigKeeper - VERSION = "0.9.16" + VERSION = "0.9.17" end