42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
# File 'lib/pindo/command/appstore/quswark.rb', line 42
def run
project_dir = Dir.pwd
config_file = File.join(project_dir, "config.json")
config_parser = Pindo::IosConfigParser.instance
config_parser.load_config(config_file: config_file)
config_json = config_parser.config_json
if config_json.nil? || config_json.empty?
raise Informative, "配置未加载,请检查配置文件: #{config_file}"
end
build_type = 'release'
if config_json['project_info']['xcode_build_type'] && config_json["project_info"]["xcode_build_type"].include?("quark")
success = Pindo::XcodeSwarkHelper.quark_run(
project_dir: project_dir,
config_json: config_json,
build_type: build_type
)
unless success
raise Informative, "Quark 配置失败,请检查日志"
end
else
success = Pindo::XcodeSwarkHelper.swark_run(
project_dir: project_dir,
config_json: config_json,
build_type: build_type
)
unless success
raise Informative, "Swark 配置失败,请检查日志"
end
end
end
|