diff --git a/Makefile b/Makefile index 28b99b6c6a..7fe0004aa8 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,10 @@ build: install: go install ./cmd/... +dist: + @ sudo bash scripts/dist.sh + @ bash scripts/publish.sh + test: go test `${NOVENDOR}` #go run tests/tendermint/*.go diff --git a/scripts/dist.sh b/scripts/dist.sh index f5abc0ad4f..977b36ae2f 100755 --- a/scripts/dist.sh +++ b/scripts/dist.sh @@ -21,13 +21,6 @@ DIR="$( cd -P "$( dirname "$SOURCE" )/.." && pwd )" # Change into that dir because we expect that. cd "$DIR" -# Generate the tag. -if [ -z "$NOTAG" ]; then - echo "==> Tagging..." - git commit --allow-empty -a -m "Release v$VERSION" - git tag -a -m "Version $VERSION" "v${VERSION}" master -fi - # Do a hermetic build inside a Docker container. docker build -t tendermint/${REPO_NAME}-builder scripts/${REPO_NAME}-builder/ docker run --rm -e "BUILD_TAGS=$BUILD_TAGS" -v "$(pwd)":/go/src/github.com/tendermint/${REPO_NAME} tendermint/${REPO_NAME}-builder ./scripts/dist_build.sh diff --git a/scripts/publish.sh b/scripts/publish.sh new file mode 100644 index 0000000000..434c28e015 --- /dev/null +++ b/scripts/publish.sh @@ -0,0 +1,7 @@ +#! /bin/bash + +# 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 +aws s3 cp --recursive build/dist s3://tendermint/binaries/basecoin/v${VERSION} --acl public-read