mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-24 14:22:16 +00:00
* Update to using go mod from dep * Remove references to make get_vendor_deps * Specify go version * Set GO111MODULE=on and add -mod=readonly * Fix exported env * switch to using go1.12 everywhere * Fix test scripts * Typo: * Prepend GO111MODULE=on * remove dep cache * Revert "remove dep cache" This reverts commit 45117bda Signed-off-by: Ismail Khoffi <Ismail.Khoffi@gmail.com> * bring back the dependency cache and change it to cache modules instead of vendored deps; also: - bump version for dependency cache - bump version on pkg-cache (includes modules directory) Signed-off-by: Ismail Khoffi <Ismail.Khoffi@gmail.com> * remove some more traces of dep: - remove Gopkg.(toml | lock) - update contributing guidlines - set global default in circleci (GO111MODULE=on) Signed-off-by: Ismail Khoffi <Ismail.Khoffi@gmail.com> * global var failed for `test_cover` with `go: unknown environment setting GO111MODULE=true` although the var was `GO111MODULE: on` Signed-off-by: Ismail Khoffi <Ismail.Khoffi@gmail.com> * Changelog pending entry Signed-off-by: Ismail Khoffi <Ismail.Khoffi@gmail.com> * Add bbolt dependency to go.mod Signed-off-by: Ismail Khoffi <Ismail.Khoffi@gmail.com> * move -mod=readonly to build flags
67 lines
1.9 KiB
Bash
Executable File
67 lines
1.9 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
# This file downloads all of the binary dependencies we have, and checks out a
|
|
# specific git hash.
|
|
#
|
|
# repos it installs:
|
|
# github.com/golang/dep/cmd/dep
|
|
# github.com/gogo/protobuf/protoc-gen-gogo
|
|
# github.com/square/certstrap
|
|
# github.com/mitchellh/gox
|
|
# github.com/golangci/golangci-lint
|
|
# github.com/petermattis/goid
|
|
# github.com/sasha-s/go-deadlock
|
|
# goimports
|
|
|
|
## check if GOPATH is set
|
|
if [ -z ${GOPATH+x} ]; then
|
|
echo "please set GOPATH (https://github.com/golang/go/wiki/SettingGOPATH)"
|
|
exit 1
|
|
fi
|
|
|
|
mkdir -p "$GOPATH/src/github.com"
|
|
cd "$GOPATH/src/github.com" || exit 1
|
|
|
|
installFromGithub() {
|
|
repo=$1
|
|
commit=$2
|
|
# optional
|
|
subdir=$3
|
|
echo "--> Installing $repo ($commit)..."
|
|
if [ ! -d "$repo" ]; then
|
|
mkdir -p "$repo"
|
|
git clone "https://github.com/$repo.git" "$repo"
|
|
fi
|
|
if [ ! -z ${subdir+x} ] && [ ! -d "$repo/$subdir" ]; then
|
|
echo "ERROR: no such directory $repo/$subdir"
|
|
exit 1
|
|
fi
|
|
pushd "$repo" && \
|
|
git fetch origin && \
|
|
git checkout -q "$commit" && \
|
|
if [ ! -z ${subdir+x} ]; then cd "$subdir" || exit 1; fi && \
|
|
go install && \
|
|
if [ ! -z ${subdir+x} ]; then cd - || exit 1; fi && \
|
|
popd || exit 1
|
|
echo "--> Done"
|
|
echo ""
|
|
}
|
|
|
|
######################## DEVELOPER TOOLS #####################################
|
|
installFromGithub gogo/protobuf 61dbc136cf5d2f08d68a011382652244990a53a9 protoc-gen-gogo
|
|
|
|
installFromGithub square/certstrap e27060a3643e814151e65b9807b6b06d169580a7
|
|
|
|
# used to build tm-monitor & tm-bench binaries
|
|
installFromGithub mitchellh/gox 51ed453898ca5579fea9ad1f08dff6b121d9f2e8
|
|
|
|
## golangci-lint v1.13.2
|
|
installFromGithub golangci/golangci-lint 7b2421d55194c9dc385eff7720a037aa9244ca3c cmd/golangci-lint
|
|
|
|
## make test_with_deadlock
|
|
## XXX: https://github.com/tendermint/tendermint/issues/3242
|
|
installFromGithub petermattis/goid b0b1615b78e5ee59739545bb38426383b2cda4c9
|
|
installFromGithub sasha-s/go-deadlock d68e2bc52ae3291765881b9056f2c1527f245f1e
|
|
go get golang.org/x/tools/cmd/goimports
|