52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
# File 'lib/commands/xcode_build.rb', line 52
def builddistribution(target_file, build_dir, artwork, exportName, deliverablesPath, appicon)
cmd = "mkdir -p tmp/Payload"
EcbSharedLib::CL.do_cmd(cmd, "#{build_dir}")
cmd = "cp -Rp '#{target_file}' tmp/Payload"
EcbSharedLib::CL.do_cmd(cmd, "#{build_dir}")
export_name = exportName.split(".").first
sym_file = "#{export_name}_dSYM.zip"
if (!artwork.nil?) then
if (appicon == true and File.exist?("#{artwork}")) then
cmd = "cp '#{artwork}' #{build_dir}/tmp/"
EcbSharedLib::CL.do_cmd(cmd, '.')
paths = artwork.split("/")
cmd = "mv 'tmp/#{paths.last}' tmp/iTunesArtwork"
EcbSharedLib::CL.do_cmd(cmd, "#{build_dir}")
end
end
cmd = "ditto -c -k --norsrc #{build_dir}/tmp \"#{deliverablesPath}/#{exportName}\""
EcbSharedLib::CL.do_cmd(cmd, '.')
cmd = "ditto -c -k --norsrc --keepParent '#{build_dir}/#{target_file}.dSYM' '#{deliverablesPath}/#{archiveName}/dSYMs/#{sym_file}'";
EcbSharedLib::CL.do_cmd(cmd, '.')
end
|