From 0b35072e962449fe3e230482982621f26507af8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Roth?= Date: Tue, 3 Dec 2024 11:42:39 +0100 Subject: [PATCH] swagger: install native swag --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index ff2245612..28bb95a88 100644 --- a/Makefile +++ b/Makefile @@ -44,7 +44,7 @@ version: ## Print aptly version swagger-install: # Install swag - @test -f $(BINPATH)/swag || GOOS=linux GOARCH=amd64 go install github.com/swaggo/swag/cmd/swag@latest + @test -f $(BINPATH)/swag || GOOS= GOARCH= go install github.com/swaggo/swag/cmd/swag@latest # Generate swagger.conf cp docs/swagger.conf.tpl docs/swagger.conf echo "// @version $(VERSION)" >> docs/swagger.conf @@ -79,7 +79,9 @@ build: prepare swagger ## Build aptly install: @echo "\e[33m\e[1mBuilding aptly ...\e[0m" - go generate + # go generate + @go generate + # go install -v @out=`mktemp`; if ! go install -v > $$out 2>&1; then cat $$out; rm -f $$out; echo "\nBuild failed\n"; exit 1; else rm -f $$out; fi test: prepare swagger etcd-install ## Run unit tests