lib/ComponentSynchronizer.rb in pixab-1.2.2 vs lib/ComponentSynchronizer.rb in pixab-1.2.3
- old
+ new
@@ -9,27 +9,30 @@
module Pixab
class ComponentSynchronizer
- attr_accessor :is_need_build, :is_need_remote_repo
+ attr_accessor :is_need_build, :is_need_remote_repo, :is_need_pod_install
attr_reader :repo_manager, :repos, :main_repo_name, :updated_repo_names
def initialize(repo_manager = RepoManager.new, commands = nil)
@repo_manager = repo_manager
@is_need_build = false
@is_need_remote_repo = false
+ @is_need_pod_install = true
if commands.nil?
return
end
commands.each_index do |index|
command = commands[index]
case command
when "--build"
@is_need_build = true
when "--remote-repo"
@is_need_remote_repo = true
+ when "--no-pod-install"
+ @is_need_pod_install = false
else
end
end
end
@@ -143,12 +146,14 @@
File.open(podfile_path, "w+") do |aFile|
aFile.syswrite(podfile_content)
end
end
- system "mbox pod install --repo-update"
- Utilities.check_shell_result("Error: execute `mbox pod install --repo-update` failed")
-
+ if is_need_pod_install
+ system "mbox pod install --repo-update"
+ Utilities.check_shell_result("Error: execute `mbox pod install --repo-update` failed")
+ end
+
@updated_repo_names = updated_repo_names
end
# 编译
def build