| 1234567891011121314151617 |
- VER="0.0.1"
- DATA=$(shell date +%Y%m%d)
- GIT=$(shell git rev-parse --short HEAD)
- BRANCH=$(shell git rev-parse --abbrev-ref HEAD)
- build: checkfile
- ${GOPATH}/bin/swag init
- go build -v -a -ldflags "-X main.MinVersion=$(VER) -X main.PublishDate=$(DATA) -X main.CommitId=$(GIT) -X main.Branch=$(BRANCH)"
- clean:
- rm apsServer -f
- .PHONY: checkfile
- checkfile:
- if [ ! -f $(GOPATH)/bin/swag ];then \
- go install github.com/swaggo/swag/cmd/swag@latest; \
- fi
|