lib/cocoapods-bb-PodAssistant/command/stable/sync.rb in cocoapods-bb-PodAssistant-0.1.7 vs lib/cocoapods-bb-PodAssistant/command/stable/sync.rb in cocoapods-bb-PodAssistant-0.1.8
- old
+ new
@@ -5,14 +5,10 @@
module Pod
class Command
class Stable < Command
class Sync < Stable
- require 'fileutils'
- require 'cocoapods/executable.rb'
- extend Executable
- executable :git
self.summary = '[同步远端yml配置] sync a Stable yml config file'
self.description = <<-DESC
同步远端stable yml配置文件,并对本地文件进行合并操作
@@ -24,32 +20,11 @@
def run
puts "开始合并远端stable yml数据".yellow
# 数据合并
source_manager = BB::SourceManager.new()
- fetch_stale_git
source_manager.merge_stable_data
puts "[PodAssistant] `pod stable sync` complete! Please execute the [pod install/ pod update] command".green
- end
-
- # 拉取stable仓库代码 ruby脚本内部调用
- def clone_stable_git
- cache = BB::Cache.new()
- cachePath = cache.cachePath
- configGitPath(cachePath)
- unless Dir.exist?(File.join(cachePath))
- clonePath = File.dirname(cachePath)
- FileUtils.mkdir_p clonePath
- git_clone(@stable_source,clonePath)
- end
- end
-
- def fetch_stale_git
- clone_stable_git
- # git操作
- git_reset
- git_fetch
- git_checkout_and_pull(@stable_source, @stable_branch, @stable_tag)
end
end
end
end