diff --git a/Makefile b/Makefile index 2c224c6d199c0e2c2f7fcce11fab82fe8c77062f..a7906840059265f8933b84cf0d6be913351d5262 100644 --- a/Makefile +++ b/Makefile @@ -37,10 +37,8 @@ ARCH = amd64 SHELL = /bin/bash prepare: - 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/ - 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.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 #./before_ut.sh .PHONE: test @@ -52,7 +50,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) . go && [[ -z `git status -s` ]] .PHONY: verify verify: clean license lint test