Merge pull request #7 from ngtuna/gofmt

add gofmt to Makefile
This commit is contained in:
Tuna 2018-04-11 09:33:10 +07:00 committed by GitHub
commit 1c0b07411c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,7 +9,12 @@
.PHONY: tomo-windows tomo-windows-386 tomo-windows-amd64 .PHONY: tomo-windows tomo-windows-386 tomo-windows-amd64
GOBIN = $(shell pwd)/build/bin GOBIN = $(shell pwd)/build/bin
GOFMT = gofmt
GO ?= latest GO ?= latest
GO_PACKAGES = .
GO_FILES := $(shell find $(shell go list -f '{{.Dir}}' $(GO_PACKAGES)) -name \*.go)
GIT = git
tomo: tomo:
build/env.sh go run build/ci.go install ./cmd/tomo build/env.sh go run build/ci.go install ./cmd/tomo
@ -143,4 +148,8 @@ tomo-windows-386:
tomo-windows-amd64: tomo-windows-amd64:
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=windows/amd64 -v ./cmd/tomo build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=windows/amd64 -v ./cmd/tomo
@echo "Windows amd64 cross compilation done:" @echo "Windows amd64 cross compilation done:"
@ls -ld $(GOBIN)/tomo-windows-* | grep amd64 @ls -ld $(GOBIN)/geth-windows-* | grep amd64
gofmt:
$(GOFMT) -s -w $(GO_FILES)
$(GIT) checkout vendor