59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
# File 'lib/fwtoolkit/cli/ota.rb', line 59
def upload(project_root)
if options[:sign]
invoke('sign')
else
invoke FWToolkit::Xcode, 'build', [project_root], :clean => true, :archive => true, :type => 'testing', :sdk => 'iphoneos'
end
Projectfile.load! project_root
raise Thor::Error, "Unable to find the xcarchive file at path: #{ipa}" unless File.exists?(ipa_path)
raise Thor::Error, "Unable to find the dSYM file at path: #{dsym}" unless File.exists?(dsym_path)
uploader = FWToolkit::OTA::HockeyappClient.new(Config.hockeyapp_api_token, Projectfile.app_token)
begin
uploader.upload_build ipa_path, dsym_path
rescue StandardError => e
say_status :error, "Error uploading to hockeyapp: #{e.message}", :red
end
say_status :upload, "Uploaded a new version to Hockeyapp", :green
end
|