Fix: broken ci and tests
All checks were successful
Go test / run-go-vet (push) Successful in 5s
Go test / run-go-test (push) Successful in 22s
Go test / cleanup-go-test (push) Successful in 4s
Go test / check-swagger-up-to-date (push) Successful in 9s
Go test / release-image (push) Successful in 3m22s

This commit is contained in:
2025-12-13 02:17:46 +08:00
parent e6c46f29f5
commit 0fc8f1f08c
6 changed files with 36 additions and 14 deletions

View File

@@ -1,8 +1,9 @@
.PHONY: all swagger install postgres test mac reset \
.PHONY: all swagger install postgres test mac \
docker docker-quiet docker-clean
SWAG ?= go run github.com/swaggo/swag/cmd/swag@v1.16.4
DOCKER ?= docker
DOCKER_BUILD_ARGS +=
COMPOSE_ARGS += --progress plain
COMPOSE ?= $(DOCKER) compose $(COMPOSE_ARGS)
@@ -14,20 +15,19 @@ all: swagger docker-build-native docker
mac: swagger docker-build-run docker
reset:
$(COMPOSE) exec backend reset
swagger:
$(SWAG) fmt
$(SWAG) init -o docs -g cmds/serve.go -pdl 1
docker-build-native: $(TARGET)
$(DOCKER) build . --target native \
$(DOCKER) build . $(DOCKER_BUILD_ARGS) \
--target native \
-t go2025/backend:native \
-t go2025/backend:latest
docker-build-run:
$(DOCKER) build . --target build-run \
$(DOCKER) build . $(DOCKER_BUILD_ARGS) \
--target build-run \
-t go2025/backend:build-run \
-t go2025/backend:latest