我看了makeFile里面,并没有对compile.sh 进行触发的逻辑, 但是,在实际make执行的时候,就会触发compile.sh
GITCOMMIT := $(shell git rev-parse HEAD)
GITDATE := $(shell git show -s --format='%ct')
LDFLAGSSTRING +=-X main.GitCommit=$(GITCOMMIT)
LDFLAGSSTRING +=-X main.GitDate=$(GITDATE)
LDFLAGS := -ldflags "$(LDFLAGSSTRING)"
go-signature:
env GO111MODULE=on go build -v $(LDFLAGS) ./cmd/go-signature
clean:
rm go-signature
test:
go test -v ./...
lint:
golangci-lint run ./...
GITCOMMIT := $(shell git rev-parse HEAD) GITDATE := $(shell git show -s --format='%ct')
LDFLAGSSTRING +=-X main.GitCommit=$(GITCOMMIT) LDFLAGSSTRING +=-X main.GitDate=$(GITDATE) LDFLAGS := -ldflags "$(LDFLAGSSTRING)"
go-signature: env GO111MODULE=on go build -v $(LDFLAGS) ./cmd/go-signature
clean: rm go-signature
test: go test -v ./...
lint: golangci-lint run ./...
proto-go ./compile.sh
注意脚本的目录要写对