tendermint/scripts/publish.sh

21 lines
476 B
Bash
Raw Normal View History

2017-03-07 13:43:51 -05:00
#!/usr/bin/env bash
2017-06-02 23:20:02 -04:00
set -e
2017-03-07 13:43:51 -05:00
VERSION=$1
2017-06-02 23:20:02 -04:00
DIST_DIR=./build/dist
2017-03-07 13:43:51 -05:00
# Get the version from the environment, or try to figure it out.
if [ -z $VERSION ]; then
VERSION=$(awk -F\" 'TMCoreSemVer =/ { print $2; exit }' < version/version.go)
2017-03-07 13:43:51 -05:00
fi
if [ -z "$VERSION" ]; then
echo "Please specify a version."
exit 1
fi
2017-09-26 13:46:36 +03:00
echo "==> Copying ${DIST_DIR} to S3..."
2017-03-07 13:43:51 -05:00
# copy to s3
2017-06-02 23:20:02 -04:00
aws s3 cp --recursive ${DIST_DIR} s3://tendermint/binaries/tendermint/v${VERSION} --acl public-read
2017-03-07 13:43:51 -05:00
exit 0