[#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 <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2021-11-23 12:42:31 +03:00 committed by Alex Vanin
parent d8e42fcd16
commit 3723fcaacf

View file

@ -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/...