From 42d40873328f0308bca3665fa829804c1c68c6b8 Mon Sep 17 00:00:00 2001 From: Rigel Date: Fri, 21 Apr 2017 14:26:29 -0400 Subject: [PATCH 1/6] doc clarity --- docs/guide/basecoin-basics.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/guide/basecoin-basics.md b/docs/guide/basecoin-basics.md index 9ecb08c44..3cc179038 100644 --- a/docs/guide/basecoin-basics.md +++ b/docs/guide/basecoin-basics.md @@ -41,6 +41,7 @@ If you take a look at the `genesis.json` file, you will see one account listed t This account corresponds to the private key in `key.json`. We also included the private key for another account, in `key2.json`. +Leave basecoin running and open a new terminal window. Let's check the balance of these two accounts: ``` From 3c2a6c5d8c40ac126a93c44bd2430c1d5e360ffb Mon Sep 17 00:00:00 2001 From: rigel rozanski Date: Fri, 21 Apr 2017 16:50:12 -0400 Subject: [PATCH 2/6] cleanup/small fixes --- cmd/commands/reset.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/cmd/commands/reset.go b/cmd/commands/reset.go index d1b4dfbbc..7c532fbef 100644 --- a/cmd/commands/reset.go +++ b/cmd/commands/reset.go @@ -1,8 +1,6 @@ package commands import ( - "path" - "github.com/spf13/cobra" tmcmd "github.com/tendermint/tendermint/cmd/tendermint/commands" @@ -17,9 +15,7 @@ var UnsafeResetAllCmd = &cobra.Command{ func unsafeResetAllCmd(cmd *cobra.Command, args []string) error { basecoinDir := BasecoinRoot("") - tmDir := path.Join(basecoinDir) - tmConfig := tmcfg.GetConfig(tmDir) - + tmConfig := tmcfg.GetConfig(basecoinDir) tmcmd.ResetAll(tmConfig, log) return nil } From 344d6ce46b4fd11df2e3deb1b8e4afab2c995b2d Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Wed, 26 Apr 2017 01:35:10 -0400 Subject: [PATCH 3/6] update changelog date for 0.4.0 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ddfaf343..677cebb4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## 0.4.0 (TBD) +## 0.4.0 (April 21, 2017) BREAKING CHANGES: From 3093cb8dc395b635fea66f449377c6310ef17269 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Wed, 26 Apr 2017 01:35:51 -0400 Subject: [PATCH 4/6] update tendermint to 0.9.2 in glide. fixes #72 --- glide.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glide.lock b/glide.lock index bc150cd7d..4c67c14d6 100644 --- a/glide.lock +++ b/glide.lock @@ -107,7 +107,7 @@ imports: - app - client - name: github.com/tendermint/tendermint - version: e8cad948e366cd1d0a9ebef642073f4ade9899e9 + version: 6bcd4242f1f336e2b2ef4f644fabaf56222b34d0 subpackages: - blockchain - cmd/tendermint/commands From b84b3690943a182f5fc5b9ff19722c468a9fbc96 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Wed, 26 Apr 2017 01:38:11 -0400 Subject: [PATCH 5/6] scripts for binaries --- scripts/basecoin-builder/Dockerfile | 12 +++++++ scripts/dist.sh | 53 +++++++++++++++++++++++++++ scripts/dist_build.sh | 55 +++++++++++++++++++++++++++++ 3 files changed, 120 insertions(+) create mode 100644 scripts/basecoin-builder/Dockerfile create mode 100755 scripts/dist.sh create mode 100755 scripts/dist_build.sh diff --git a/scripts/basecoin-builder/Dockerfile b/scripts/basecoin-builder/Dockerfile new file mode 100644 index 000000000..28726034b --- /dev/null +++ b/scripts/basecoin-builder/Dockerfile @@ -0,0 +1,12 @@ +FROM golang:1.7.4 + +RUN apt-get update && apt-get install -y --no-install-recommends \ + zip \ + && rm -rf /var/lib/apt/lists/* + +# We want to ensure that release builds never have any cgo dependencies so we +# switch that off at the highest level. +ENV CGO_ENABLED 0 + +RUN mkdir -p $GOPATH/src/github.com/tendermint/basecoin +WORKDIR $GOPATH/src/github.com/tendermint/basecoin diff --git a/scripts/dist.sh b/scripts/dist.sh new file mode 100755 index 000000000..f5abc0ad4 --- /dev/null +++ b/scripts/dist.sh @@ -0,0 +1,53 @@ +#!/usr/bin/env bash +set -e + +REPO_NAME="basecoin" + +# 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 +echo "==> Building version $VERSION..." + +# Get the parent directory of where this script is. +SOURCE="${BASH_SOURCE[0]}" +while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done +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 + +# Add $REPO_NAME and $VERSION prefix to package name. +rm -rf ./build/dist +mkdir -p ./build/dist +for FILENAME in $(find ./build/pkg -mindepth 1 -maxdepth 1 -type f); do + FILENAME=$(basename "$FILENAME") + cp "./build/pkg/${FILENAME}" "./build/dist/${REPO_NAME}_${VERSION}_${FILENAME}" +done + +# Make the checksums. +pushd ./build/dist +shasum -a256 ./* > "./${REPO_NAME}_${VERSION}_SHA256SUMS" +popd + +# Done +echo +echo "==> Results:" +ls -hl ./build/dist + +exit 0 diff --git a/scripts/dist_build.sh b/scripts/dist_build.sh new file mode 100755 index 000000000..2812bef8a --- /dev/null +++ b/scripts/dist_build.sh @@ -0,0 +1,55 @@ +#!/usr/bin/env bash +set -e + +# Get the parent directory of where this script is. +SOURCE="${BASH_SOURCE[0]}" +while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done +DIR="$( cd -P "$( dirname "$SOURCE" )/.." && pwd )" + +# Change into that dir because we expect that. +cd "$DIR" + +# Get the git commit +GIT_COMMIT="$(git rev-parse --short HEAD)" +GIT_DESCRIBE="$(git describe --tags --always)" +GIT_IMPORT="github.com/tendermint/basecoin/version" + +# Determine the arch/os combos we're building for +XC_ARCH=${XC_ARCH:-"386 amd64 arm"} +XC_OS=${XC_OS:-"solaris darwin freebsd linux windows"} + +# Delete the old dir +echo "==> Removing old directory..." +rm -rf build/pkg +mkdir -p build/pkg + +# Make sure build tools are available. +make tools + +# Get VENDORED dependencies +make get_vendor_deps + +# Build! +echo "==> Building..." +"$(which gox)" \ + -os="${XC_OS}" \ + -arch="${XC_ARCH}" \ + -osarch="!darwin/arm !solaris/amd64 !freebsd/amd64" \ + -ldflags "-X ${GIT_IMPORT}.GitCommit='${GIT_COMMIT}' -X ${GIT_IMPORT}.GitDescribe='${GIT_DESCRIBE}'" \ + -output "build/pkg/{{.OS}}_{{.Arch}}/basecoin" \ + -tags="${BUILD_TAGS}" \ + github.com/tendermint/basecoin/cmd/basecoin + +# Zip all the files. +echo "==> Packaging..." +for PLATFORM in $(find ./build/pkg -mindepth 1 -maxdepth 1 -type d); do + OSARCH=$(basename "${PLATFORM}") + echo "--> ${OSARCH}" + + pushd "$PLATFORM" >/dev/null 2>&1 + zip "../${OSARCH}.zip" ./* + popd >/dev/null 2>&1 +done + + +exit 0 From 76a8e34d640337a301b6ae0795c15f7ce8fc0c3c Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Wed, 26 Apr 2017 01:38:18 -0400 Subject: [PATCH 6/6] changelog and version bump --- CHANGELOG.md | 6 ++++++ version/version.go | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 677cebb4e..035d464cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 0.4.1 (April 26, 2017) + +BUG FIXES: + +- Fix bug in `basecoin unsafe_reset_X` where the `priv_validator.json` was not being reset + ## 0.4.0 (April 21, 2017) BREAKING CHANGES: diff --git a/version/version.go b/version/version.go index ae549d083..382282305 100644 --- a/version/version.go +++ b/version/version.go @@ -2,6 +2,6 @@ package version const Maj = "0" const Min = "4" -const Fix = "0" +const Fix = "1" -const Version = Maj + "." + Min + "." + Fix +const Version = "0.4.1"