peartherapeutics / bitrise-aws-device-farm-file-deploy

MIT License
6 stars 15 forks source link

parsing of JSOn could be done with a real parser to using the cut command #8

Open otusweb opened 7 years ago

otusweb commented 7 years ago

Sorry, i had opened this issue with the wrong account.

when creating the upload, the JSON returned by the create-upload is not parsed, but rather the variables are extracted by using the cut command.

Instead i have used the python son parser to extract the variable:

uploadURL=$(echo $createUploadResult | python -c 'import son,sys;obj=json.load(sys.stdin);print obj["upload"]["url"]') uploadARN=$(echo $createUploadResult | python -c 'import son,sys;obj=json.load(sys.stdin);print obj["upload"]["arn"]')

otusweb commented 7 years ago

Created pull request: https://github.com/peartherapeutics/bitrise-aws-device-farm-file-deploy/pull/10

fadookie commented 7 years ago

See my PR comments https://github.com/peartherapeutics/bitrise-aws-device-farm-file-deploy/pull/10#pullrequestreview-1359292

fadookie commented 7 years ago

Proposed robustness improvement https://github.com/peartherapeutics/bitrise-aws-device-farm-file-deploy/pull/10#issuecomment-250322523

fadookie commented 7 years ago

Let's keep this open until I implement the None check(s)