优化部署流程

This commit is contained in:
eafonyang
2026-06-30 13:50:29 +08:00
parent a52adf7e27
commit 23f712cf86
9 changed files with 362 additions and 204 deletions
+4 -1
View File
@@ -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 ./...