github.com/kardianos/nomad@v0.1.3-0.20151022182107-b13df73ee850/scripts/bintray_upload.sh (about) 1 #!/bin/bash 2 set -e 3 4 # Get the version from the command line 5 VERSION=$1 6 if [ -z $VERSION ]; then 7 echo "Please specify a version." 8 exit 1 9 fi 10 11 # Make sure we have a bintray API key 12 if [ -z $BINTRAY_API_KEY ]; then 13 echo "Please set your bintray API key in the BINTRAY_API_KEY env var." 14 exit 1 15 fi 16 17 # Upload 18 for ARCHIVE in ./pkg/dist/*; do 19 ARCHIVE_NAME=$(basename ${ARCHIVE}) 20 21 echo Uploading: $ARCHIVE_NAME 22 curl \ 23 -T ${ARCHIVE} \ 24 -umitchellh:${BINTRAY_API_KEY} \ 25 "https://api.bintray.com/content/mitchellh/nomad/nomad/${VERSION}/${ARCHIVE_NAME}" 26 done 27 28 exit 0