From 3723fcaacf5a4ca120facdd01c088e86a6c57f56 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Tue, 23 Nov 2021 12:42:31 +0300 Subject: [PATCH] [#177] Makefile: build with `neo-go` from go.mod Currently compiler version and test/interop version are decoupled. It would be nice to use the compiler from go.mod by default as this is the version our contracts are tested on. Signed-off-by: Evgenii Stratonikov --- Makefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index e477afa..e1ac5cc 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,13 @@ #!/usr/bin/make -f SHELL=bash -NEOGO?=neo-go +GOBIN ?= $(shell go env GOPATH)/bin +NEOGO ?= $(GOBIN)/cli VERSION?=$(shell git describe --tags) -.PHONY: all build clean test +.PHONY: all build clean test neo-go .PHONY: alphabet mainnet morph nns sidechain -build: all +build: neo-go all all: sidechain mainnet sidechain: alphabet morph nns @@ -34,6 +35,10 @@ morph: $(foreach sc,$(morph_sc),$(sc)/$(sc)_contract.nef) mainnet: $(foreach sc,$(mainnet_sc),$(sc)/$(sc)_contract.nef) nns: $(foreach sc,$(nns_sc),$(sc)/$(sc)_contract.nef) +neo-go: + @go list -f '{{.Path}}/...@{{.Version}}' -m github.com/nspcc-dev/neo-go \ + | xargs go install -v + test: @go test ./tests/...