123456789101112131415161718192021222324252627282930313233343536373839404142 |
- BUILD_DATE = $(shell date +%F_%T_%Z_%a)
- TAG=$(shell git describe --tags --abbrev=0)
- GO_VERS = $(shell go version | sed -e 's/ /_/g'| cut -b 12-)
- SERVICENAME=gostore
- build:
- clear
- go fmt ./...
- go build -ldflags "-w -s -X main.GoVersion=$(GO_VERS) -X main.Version=${TAG} -X main.Date=${BUILD_DATE}" -o ./bin/gostore ./cmd/gostore/main.go
- strip -s ./bin/gostore
- upx -f ./bin/gostore
- dev.run:
- clear
- rm -rf ./bin_dev
- mkdir -p ./bin_dev
- cp -rf ./web ./bin_dev
- go fmt ./...
- go build -race -o ./bin_dev/gostore_dev ./cmd/gostore/main.go
- ./dev.sh
- mod:
- clear
- go get -u ./...
- go mod tidy -compat=1.22.0
- go mod vendor
- go fmt ./...
- test.run:
- clear
- go fmt ./...
- go test -vet=all -race -timeout 30s -coverprofile cover.out ./...
- go tool cover -func=cover.out
- lint:
- clear
- go fmt ./...
- golangci-lint run ./cmd/serv_old/...
- golangci-lint run ./cmd/client_pwa/...
- golangci-lint run ./internal/...
- SERVICEURL=./
- graph:
- goda graph -f "{{.Package.Name}}" "shared($(SERVICEURL)... )" | dot -Tsvg -o ./doc/graph.svg
- dot:
- goda graph -f "{{.Package.Name}}" "shared($(SERVICEURL)... )" > ./doc/graph.dot
- dot1:
- image_packages ./ doc/packages.graphml
|