Module: YKFastlane::Helper

Includes:
Tools
Included in:
Init, Interface
Defined in:
lib/ykfastlane/helper.rb

Constant Summary collapse

YKRUNING_PATH =
File.expand_path(Dir.pwd)
YKCONFIG_PATH =
File.expand_path(File.join(YKFastlane::YKFASTLANE_ENV_PATH, 'evnConfig.yml'))
YKFastlne_SCRIPT_PATH =
File.expand_path(File.join(YKFastlane::YKFASTLANE_ENV_PATH, 'ykfastlane_script'))
K_fastfile_remote =
:fastfile_remote
K_wx_access_token =
:wx_access_token
YKWECHAT_ROBOT_TOKEN =
Helper.load_config_value(Helper::K_wx_access_token)
K_YK_CONFIG_FASTLANE_SCRIPT =
:fast_file
K_YK_CONFIG_FASTLANE_DEBUG =
:fast_file_debug

Class Method Summary collapse

Methods included from Tools

UI, clone_git_repository, display_yml, git_commit, git_pull, green, load_yml, load_yml_value, notify_message_to_enterprise_wechat, over_write_yml_dict, show_prompt, update_yml, yk_ask, yk_ask_with_answers

Class Method Details

.default_certificate_git_remoteObject



50
51
52
53
54
55
# File 'lib/ykfastlane/helper.rb', line 50

def self.default_certificate_git_remote()
  url = "#{self.default_git_domain}/App/iOS/certificates/YKCertificateProfiles.git"
  "" "
  \033[0;32m#{url}\e[0m
    " ""
end

.default_fast_file_remoteObject



42
43
44
45
46
47
48
# File 'lib/ykfastlane/helper.rb', line 42

def self.default_fast_file_remote()
  url1 = "#{self.default_git_domain}/App/iOS/ykfastlane.git"
  url2 = "https://github.com/stephen5652/ykfastlane_scrip.git"
  "" "
  \033[0;32m#{url1}\e[0m or \033[0;32m#{url2}\e[0m
    " ""
end

.default_git_domainObject



32
33
34
35
36
37
38
39
40
# File 'lib/ykfastlane/helper.rb', line 32

def self.default_git_domain()
  p0 = "http://gitlab."
  p1 = "y"
  p2 = 'ea'
  p3 = "h"
  p4 = "ka"
  p5 = ".com"
  p0 + p1 + p2 + p3 + p4 + p5
end

.display_config_ymlObject



20
21
22
# File 'lib/ykfastlane/helper.rb', line 20

def self.display_config_yml()
  Tools.display_yml(Helper::YKCONFIG_PATH)
end

.fastlane_scriptObject



71
72
73
74
75
76
77
78
79
80
81
# File 'lib/ykfastlane/helper.rb', line 71

def self.fastlane_script
  path = Helper.load_config_value(K_YK_CONFIG_FASTLANE_SCRIPT)
  debug = Helper.load_config_value(K_YK_CONFIG_FASTLANE_DEBUG)
  puts "path:#{path}"
  puts "debug flag[#{debug.class}]:#{debug}"
  if path.blank? || debug.blank? || debug != "1"
    path = YKFastlne_SCRIPT_PATH
  end
  puts "fastlane file path:#{path}"
  path
end

.load_config_value(key) ⇒ Object



24
25
26
# File 'lib/ykfastlane/helper.rb', line 24

def self.load_config_value(key)
  Tools.load_yml_value(Helper::YKCONFIG_PATH, key)
end

.load_config_ymlObject



16
17
18
# File 'lib/ykfastlane/helper.rb', line 16

def self.load_config_yml()
  Tools.load_yml(Helper::YKCONFIG_PATH)
end

.update_config(qustion, key, value) ⇒ Object



28
29
30
# File 'lib/ykfastlane/helper.rb', line 28

def self.update_config(qustion, key, value)
  Tools.update_yml(qustion, Helper::YKCONFIG_PATH, key, value)
end