class Fastlane::Actions::SyncAction

Public Class Methods

authors() click to toggle source
# File lib/fastlane/plugin/rocket/actions/sync_action.rb, line 20
def self.authors
  ["三块"]
end
available_options() click to toggle source
# File lib/fastlane/plugin/rocket/actions/sync_action.rb, line 32
def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :git,
                                 env_name: 'R_SYNC_GIT',
                                 description: '壳工程仓库地址,不传默认取git@gitlab.dushuclub.io:ios-team/dushu-ios-new.git',
                                 optional: true,
                                 type: String,
                                 default_value:"git@gitlab.dushuclub.io:ios-team/dushu-ios-new.git",
                                 verify_block: proc do |value| 
                                   ENV["R_SYNC_GIT"] = value.to_s
                                 end),
    FastlaneCore::ConfigItem.new(key: :branch,
                                 env_name: 'R_SYNC_BRANCH',
                                 description: '同步壳工程分支,不传默认取当前工程的分支',
                                 optional: true,
                                 type: String,
                                 default_value:"",
                                 verify_block: proc do |value|
                                  branch = value.to_s
                                  if branch.empty?
                                      tmp_branch = Tools.return_shell("git rev-parse --abbrev-ref HEAD")
                                      if tmp_branch == -1
                                          Tools.error("分支错误,需要传分支参数 or 在项目位置执行本命令,将会获取项目的当前分支")
                                      end
                                      branch = tmp_branch
                                  end
                                  ENV["R_SYNC_BRANCH"] = branch
                                 end)

  ]
end
description() click to toggle source
# File lib/fastlane/plugin/rocket/actions/sync_action.rb, line 16
def self.description
  "同步壳工程,将业务库可以独立运行"
end
details() click to toggle source
# File lib/fastlane/plugin/rocket/actions/sync_action.rb, line 28
def self.details
  "将壳工程的podfile和工程同步到业务库,并支持业务库自定义podfile设置"
end
is_supported?(platform) click to toggle source
# File lib/fastlane/plugin/rocket/actions/sync_action.rb, line 64
def self.is_supported?(platform)
  # Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
  # See: https://docs.fastlane.tools/advanced/#control-configuration-by-lane-and-by-platform
  #
  # [:ios, :mac, :android].include?(platform)
  true
end
return_value() click to toggle source
# File lib/fastlane/plugin/rocket/actions/sync_action.rb, line 24
def self.return_value
  # If your method provides a return value, you can describe here what it does
end
run(params) click to toggle source
# File lib/fastlane/plugin/rocket/actions/sync_action.rb, line 7
def self.run(params)
  begin
      Sync::SyncMain.run(params,available_options)
  rescue Exception => e
      Tools.error(e.message)
  end 
  Tools.log("完成!!!")
end