diff --git a/Makefile b/Makefile index a7906840059265f8933b84cf0d6be913351d5262..d5160974e265a374abab0b21d0f681214a048b2b 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,8 @@ VERSION ?= latest GO = go GO_PATH = $$($(GO) env GOPATH) -GO_OS = $$($(GO) env GOOS) +GO_OS = mac +#GO_OS = $$($(GO) env GOOS) GO_BUILD = $(GO) build GO_GET = $(GO) get GO_TEST = $(GO) test @@ -28,7 +29,7 @@ GO_BUILD_LDFLAGS = -X main.version=$(VERSION) GO_LICENSE_CHECKER = $(GO_PATH)/bin/license-header-checker GO_LICENSE_CHECKER_DIR = license-header-checker-$(GO_OS) -LICENSE_DIR = /tmp/tools/license/license.txt +LICENSE_DIR = /tmp/tools/license PLATFORMS := windows linux darwin os = $(word 1, $@) @@ -37,8 +38,8 @@ ARCH = amd64 SHELL = /bin/bash prepare: - $(GO_LICENSE_CHECKER) -version || (wget https://github.com/lsm-dev/license-header-checker/releases/download/v1.1.0/$(GO_LICENSE_CHECKER_DIR).zip -O $(GO_LICENSE_CHECKER_DIR).zip && unzip -o $(GO_LICENSE_CHECKER_DIR).zip && cp $(GO_LICENSE_CHECKER_DIR)/64bits/license-header-checker $(GO_PATH)/bin/) - ls $(LICENSE_DIR) || wget -O $(LICENSE_DIR) https://github.com/dubbogo/resources/raw/master/tools/license/license.txt + $(GO_LICENSE_CHECKER) -version || (wget https://github.com/lsm-dev/license-header-checker/releases/download/v1.2.0/$(GO_LICENSE_CHECKER_DIR).zip -O $(GO_LICENSE_CHECKER_DIR).zip && unzip -o $(GO_LICENSE_CHECKER_DIR).zip && mkdir -p $(GO_PATH)/bin/ && cp $(GO_LICENSE_CHECKER_DIR)/64bit/license-header-checker $(GO_PATH)/bin/) + wget -P $(LICENSE_DIR) https://github.com/dubbogo/resources/raw/master/tools/license/license.txt #./before_ut.sh .PHONE: test @@ -50,7 +51,7 @@ deps: prepare .PHONY: license license: clean prepare - $(GO_LICENSE_CHECKER) -v -a -r -i vendor $(LICENSE_DIR) . go && [[ -z `git status -s` ]] + $(GO_LICENSE_CHECKER) -v -a -r -i vendor $(LICENSE_DIR)/license.txt . go && [[ -z `git status -s` ]] .PHONY: verify verify: clean license lint test