From 3baea456946917589057a47219421ab676a19a84 Mon Sep 17 00:00:00 2001 From: Zach Ramsay Date: Fri, 2 Feb 2018 22:03:03 +0000 Subject: [PATCH] remove deprecated 'publish/' directory --- publish/basecoin-builder/Dockerfile | 12 ------ publish/dist.sh | 51 ------------------------ publish/dist_build.sh | 60 ----------------------------- publish/print_test_account.go | 23 ----------- publish/publish.sh | 7 ---- 5 files changed, 153 deletions(-) delete mode 100644 publish/basecoin-builder/Dockerfile delete mode 100755 publish/dist.sh delete mode 100755 publish/dist_build.sh delete mode 100644 publish/print_test_account.go delete mode 100644 publish/publish.sh diff --git a/publish/basecoin-builder/Dockerfile b/publish/basecoin-builder/Dockerfile deleted file mode 100644 index 28726034b..000000000 --- a/publish/basecoin-builder/Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -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/publish/dist.sh b/publish/dist.sh deleted file mode 100755 index 6f488477b..000000000 --- a/publish/dist.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/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" - -# Delete the old dir -echo "==> Removing old directory..." -rm -rf build/pkg -mkdir -p build/pkg - -# 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/publish/dist_build.sh b/publish/dist_build.sh deleted file mode 100755 index 036ee7735..000000000 --- a/publish/dist_build.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/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"} - -# Make sure build tools are available. -make tools - -# Get VENDORED dependencies -make get_vendor_deps - -# Build! -echo "==> Building basecoin..." -"$(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 - -echo "==> Building basecli..." -"$(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}}/basecli" \ - -tags="${BUILD_TAGS}" \ - github.com/tendermint/basecoin/cmd/basecli - -# 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 diff --git a/publish/print_test_account.go b/publish/print_test_account.go deleted file mode 100644 index f8e3fe66a..000000000 --- a/publish/print_test_account.go +++ /dev/null @@ -1,23 +0,0 @@ -// +build scripts - -package main - -import ( - "fmt" - - "github.com/cosmos/cosmos-sdk/tests" - "github.com/tendermint/go-wire" -) - -/* -PrivKey: 019F86D081884C7D659A2FEAA0C55AD015A3BF4F1B2B0B822CD15D6C15B0F00A0867D3B5EAF0C0BF6B5A602D359DAECC86A7A74053490EC37AE08E71360587C870 -PubKey: 0167D3B5EAF0C0BF6B5A602D359DAECC86A7A74053490EC37AE08E71360587C870 -Address: D9B727742AA29FA638DC63D70813C976014C4CE0 -*/ -func main() { - tAcc := tests.PrivAccountFromSecret("test") - fmt.Printf("PrivKey:%X\n", tAcc.PrivKey.Bytes()) - fmt.Printf("PubKey:%X\n", tAcc.Account.PubKey.Bytes()) - fmt.Printf("Address:%X\n", tAcc.Account.PubKey.Address()) - fmt.Println(string(wire.JSONBytesPretty(tAcc))) -} diff --git a/publish/publish.sh b/publish/publish.sh deleted file mode 100644 index 738dbdd41..000000000 --- a/publish/publish.sh +++ /dev/null @@ -1,7 +0,0 @@ -#! /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