Class: Uki_config
- Inherits:
-
Object
- Object
- Uki_config
- Defined in:
- lib/cocoapods-uki-packager/uki_config.rb
Defined Under Namespace
Modules: Mixin
Constant Summary collapse
- PROJECT_SCHEME =
scheme info
['UkiOverseas', 'miaohong'].freeze
- PROJECT_WORKSPACENAME =
workspace name
['UkiOverseas.xcworkspace', 'miaohong.xcworkspace']
Class Attribute Summary collapse
Instance Attribute Summary collapse
-
#build_time ⇒ Object
编译耗时.
-
#dsym ⇒ Object
是否产生dsym.
-
#fir_url ⇒ Object
上传Url.
-
#no_build ⇒ Object
是否执行编译命令.
-
#project_sea ⇒ Object
是否海外.
-
#release ⇒ Object
是否编译release环境.
-
#upload_time ⇒ Object
上传耗时.
-
#verbose(v) ⇒ Object
是否展示详细信息.
-
#workspace_name ⇒ Object
自动workspace名称.
Instance Method Summary collapse
-
#app_file_path ⇒ Object
读取产物记录文件.
- #archive_path ⇒ Object
- #auto_work_space_name ⇒ Object
-
#build_exe_path ⇒ Object
产物路径.
- #configuration ⇒ Object
- #dsym_config ⇒ Object
- #dsym_path ⇒ Object
-
#installation_root ⇒ Object
路径相关.
- #ipa_path ⇒ Object
- #scheme ⇒ Object
-
#verbose? ⇒ Object
是否展示详细信息.
- #workspace ⇒ Object
Class Attribute Details
.instance ⇒ Object
108 109 110 |
# File 'lib/cocoapods-uki-packager/uki_config.rb', line 108 def self.instance @instance ||= new end |
Instance Attribute Details
#build_time ⇒ Object
编译耗时
23 24 25 |
# File 'lib/cocoapods-uki-packager/uki_config.rb', line 23 def build_time @build_time end |
#dsym ⇒ Object
是否产生dsym
19 20 21 |
# File 'lib/cocoapods-uki-packager/uki_config.rb', line 19 def dsym @dsym end |
#fir_url ⇒ Object
上传Url
27 28 29 |
# File 'lib/cocoapods-uki-packager/uki_config.rb', line 27 def fir_url @fir_url end |
#no_build ⇒ Object
是否执行编译命令
15 16 17 |
# File 'lib/cocoapods-uki-packager/uki_config.rb', line 15 def no_build @no_build end |
#project_sea ⇒ Object
是否海外
13 14 15 |
# File 'lib/cocoapods-uki-packager/uki_config.rb', line 13 def project_sea @project_sea end |
#release ⇒ Object
是否编译release环境
17 18 19 |
# File 'lib/cocoapods-uki-packager/uki_config.rb', line 17 def release @release end |
#upload_time ⇒ Object
上传耗时
25 26 27 |
# File 'lib/cocoapods-uki-packager/uki_config.rb', line 25 def upload_time @upload_time end |
#verbose(v) ⇒ Object
是否展示详细信息
11 12 13 |
# File 'lib/cocoapods-uki-packager/uki_config.rb', line 11 def verbose @verbose end |
#workspace_name ⇒ Object
自动workspace名称
21 22 23 |
# File 'lib/cocoapods-uki-packager/uki_config.rb', line 21 def workspace_name @workspace_name end |
Instance Method Details
#app_file_path ⇒ Object
读取产物记录文件
99 100 101 |
# File 'lib/cocoapods-uki-packager/uki_config.rb', line 99 def app_file_path return File.join(@installation_root, "app_path") end |
#archive_path ⇒ Object
53 54 55 |
# File 'lib/cocoapods-uki-packager/uki_config.rb', line 53 def archive_path return @installation_root end |
#auto_work_space_name ⇒ Object
87 88 89 90 91 92 93 94 95 96 |
# File 'lib/cocoapods-uki-packager/uki_config.rb', line 87 def auto_work_space_name installation_root Dir.foreach(@installation_root) do |entry| if entry.end_with?('xcworkspace') @workspace_name = entry.split('.').first next end end end |
#build_exe_path ⇒ Object
产物路径
104 105 106 |
# File 'lib/cocoapods-uki-packager/uki_config.rb', line 104 def build_exe_path return IO.readlines(app_file_path).first end |
#configuration ⇒ Object
46 47 48 49 50 51 |
# File 'lib/cocoapods-uki-packager/uki_config.rb', line 46 def configuration unless release return "Debug" end return "Release" end |
#dsym_config ⇒ Object
57 58 59 60 61 62 63 |
# File 'lib/cocoapods-uki-packager/uki_config.rb', line 57 def dsym_config unless dsym return "dwarf" end return "dwarf-with-dsym" end |
#dsym_path ⇒ Object
65 66 67 |
# File 'lib/cocoapods-uki-packager/uki_config.rb', line 65 def dsym_path return File.join(@installation_root.to_s, "dsym") end |
#installation_root ⇒ Object
路径相关
79 80 81 82 83 84 |
# File 'lib/cocoapods-uki-packager/uki_config.rb', line 79 def installation_root @installation_root ||= begin current_dir = Pathname.new(Dir.pwd.unicode_normalize(:nfkc)) installation_root = current_dir end end |
#ipa_path ⇒ Object
69 70 71 |
# File 'lib/cocoapods-uki-packager/uki_config.rb', line 69 def ipa_path return File.join(@installation_root.to_s, "ipa") end |
#scheme ⇒ Object
31 32 33 34 35 36 |
# File 'lib/cocoapods-uki-packager/uki_config.rb', line 31 def scheme unless project_sea return PROJECT_SCHEME.last end return PROJECT_SCHEME.first end |
#verbose? ⇒ Object
是否展示详细信息
29 30 31 |
# File 'lib/cocoapods-uki-packager/uki_config.rb', line 29 def verbose @verbose end |
#workspace ⇒ Object
38 39 40 41 42 43 44 |
# File 'lib/cocoapods-uki-packager/uki_config.rb', line 38 def workspace unless project_sea return PROJECT_WORKSPACENAME.last end return PROJECT_WORKSPACENAME.first end |