优化部署流程
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
SWAG := $(shell go env GOPATH)/bin/swag
|
||||
|
||||
.PHONY: run build test tidy swag
|
||||
.PHONY: run build build-linux test tidy swag
|
||||
|
||||
run:
|
||||
go run ./cmd/server
|
||||
@@ -8,6 +8,9 @@ run:
|
||||
build: swag
|
||||
go build -o bin/server ./cmd/server
|
||||
|
||||
build-linux: swag
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o bin/server-linux ./cmd/server
|
||||
|
||||
test:
|
||||
go test ./...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user