39
40
41
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
|
# File 'lib/pindo/command/appstore/configproj.rb', line 39
def run
project_dir = Dir.pwd
config_file = File.join(project_dir, "config.json")
unless File.exist?(config_file)
raise Informative, "配置文件不存在: #{config_file}"
end
config_parser = Pindo::IosConfigParser.instance
config_parser.load_config(config_file: config_file)
bundle_id = config_parser.bundle_id
if bundle_id.nil? || bundle_id.empty?
raise Informative, "无法从配置文件中获取 Bundle ID"
end
puts "开始配置 Xcode 项目..."
puts " 项目目录: #{project_dir}"
puts " 配置文件: #{config_file}"
puts " Bundle ID: #{bundle_id}"
puts ""
success = Pindo::XcodeBuildConfig.configure_xcode_project(
project_dir: project_dir
)
if success
puts ""
puts "✓ Xcode 项目配置完成!"
else
raise Informative, "Xcode 项目配置失败,请检查日志"
end
end
|