Skip to content

Commit

Permalink
Merge pull request #16 from EmergeTools/addWarnings
Browse files Browse the repository at this point in the history
Add warnings
  • Loading branch information
noahsmartin authored Mar 6, 2024
2 parents a00351c + 74113de commit f46182e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/fastlane/plugin/emerge/actions/emerge_action.rb
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,11 @@ def self.run(params)
json = JSON.parse(resp.body)
upload_id = json["upload_id"]
upload_url = json["uploadURL"]
Helper::EmergeHelper.perform_upload(upload_url, upload_id, file_path)
warning = json["warning"]
if warning
UI.important(warning)
end
return Helper::EmergeHelper.perform_upload(upload_url, upload_id, file_path)
when 403
UI.error("Invalid API token")
when 400
Expand Down
2 changes: 2 additions & 0 deletions lib/fastlane/plugin/emerge/helper/emerge_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ def self.perform_upload(upload_url, upload_id, file_path)
case response.status
when 200
UI.success("Your app is processing, you can find the results at https://emergetools.com/build/#{upload_id}")
return upload_id
else
UI.error("Upload failed")
end
return nil
end
end
end
Expand Down

0 comments on commit f46182e

Please sign in to comment.