From 55b3c22d997e22875a31bda268bc0516ef60af5c Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Tue, 7 Mar 2017 13:43:51 -0500 Subject: [PATCH] publish.sh to push build to s3 --- scripts/publish.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 scripts/publish.sh diff --git a/scripts/publish.sh b/scripts/publish.sh new file mode 100755 index 000000000..e87fea0d3 --- /dev/null +++ b/scripts/publish.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +set -eu + +VERSION=$1 +DIST_DIR=$2 # ./build/dist + +# Get the version from the environment, or try to figure it out. +if [ -z $VERSION ]; then + VERSION=$(awk -F\" '/Version =/ { print $2; exit }' < version/version.go) +fi +if [ -z "$VERSION" ]; then + echo "Please specify a version." + exit 1 +fi + +# copy to s3 +aws s3 cp --recursive ${DIST_DIR} s3://tendermint/${VERSION} --acl public-read --exclude "*" --include "*.zip" +aws s3 cp ${DIST_DIR}/tendermint_${VERSION}_SHA256SUMS s3://tendermint/0.9.0 --acl public-read + +exit 0