add swagger
This commit is contained in:
8
Makefile
8
Makefile
@@ -20,7 +20,7 @@ imports-tools:
|
|||||||
go install golang.org/x/tools/cmd/goimports@latest; \
|
go install golang.org/x/tools/cmd/goimports@latest; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
.PHONY: all build run test lint fmt imports
|
.PHONY: all swag build run test lint fmt imports
|
||||||
|
|
||||||
all: build
|
all: build
|
||||||
|
|
||||||
@@ -30,6 +30,12 @@ run: build
|
|||||||
|
|
||||||
BUILD_PARAMS = -trimpath -ldflags "-X git.oblat.lv/alex/triggerssmith/internal/vars.Version=$(VERSION)"
|
BUILD_PARAMS = -trimpath -ldflags "-X git.oblat.lv/alex/triggerssmith/internal/vars.Version=$(VERSION)"
|
||||||
|
|
||||||
|
build-with-swag: swag build
|
||||||
|
|
||||||
|
swag:
|
||||||
|
@echo "-- generating swagger docs"
|
||||||
|
@swag init -g cmd/serve.go
|
||||||
|
|
||||||
build:
|
build:
|
||||||
@echo "-- building $(NAME)"
|
@echo "-- building $(NAME)"
|
||||||
@go build $(BUILD_PARAMS) -o $(BINARY) $(ENTRY)
|
@go build $(BUILD_PARAMS) -o $(BINARY) $(ENTRY)
|
||||||
|
|||||||
Reference in New Issue
Block a user