github.com/elves/elvish@v0.15.0/tools/cirrus-deploy.sh (about) 1 #!/bin/sh -e 2 3 # Should be invoked from repo root. 4 # 5 # Environment variables used by this script: 6 # $CIRRUS_BRANCH $CIRRUS_TAG $BINTRAY_TOKEN 7 8 if [ "$CIRRUS_BRANCH" = master ]; then 9 export VERSION=HEAD 10 elif [ "$CIRRUS_TAG " ]; then 11 export VERSION=$CIRRUS_TAG 12 else 13 export VERSION=$CIRRUS_BRANCH 14 fi 15 MANIFEST=_bin/manifest ./tools/buildall.sh 16 17 echo "Deleting old HEAD" 18 curl -X DELETE -u$BINTRAY_TOKEN \ 19 https://api.bintray.com/packages/elves/elvish/elvish/versions/$VERSION 20 21 cat _bin/manifest | while read f; do 22 echo "Deploying $f" 23 curl -T _bin/$f -u$BINTRAY_TOKEN \ 24 https://api.bintray.com/content/elves/elvish/elvish/$VERSION/$f'?publish=1&override=1' 25 done