Created
September 9, 2019 14:57
-
-
Save billmeyer/86fc5f36b7429dad58a76a89e8e6cf5c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.