Skip to content

Instantly share code, notes, and snippets.

@billmeyer
Created September 9, 2019 14:57
Show Gist options
  • Save billmeyer/86fc5f36b7429dad58a76a89e8e6cf5c to your computer and use it in GitHub Desktop.
Save billmeyer/86fc5f36b7429dad58a76a89e8e6cf5c to your computer and use it in GitHub Desktop.
#!/bin/bash
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <file_to_upload>"
exit -1
fi
FILE=$1
filename=$(basename $FILE)
curl -u $SAUCE_USERNAME:$SAUCE_ACCESS_KEY -X POST -H "Content-Type: application/octet-stream" https://saucelabs.com/rest/v1/storage/${SAUCE_USERNAME}/${filename}?overwrite=true --data-binary @${FILE}
@billmeyer
Copy link
Author

Be sure to set the SAUCE_USERNAME and SAUCE_ACCESS_KEY environment variables to your specific account values before calling the script.

Also- pass a relative or fully qualified path to the script for the file you want to upload.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment