swagger: rename 'docs/' to 'swagger/'

Use 'docs/' for zot-related documentation.

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
This commit is contained in:
Ramkumar Chinchani
2021-10-20 21:01:06 +00:00
committed by Ramkumar Chinchani
parent 0d28feef3e
commit 8f3d7d3719
7 changed files with 14 additions and 14 deletions
+8 -8
View File
@@ -8,18 +8,18 @@ TMPDIR := $(shell mktemp -d)
STACKER := $(shell which stacker)
.PHONY: all
all: doc binary binary-minimal debug test test-clean check
all: swagger binary binary-minimal debug test test-clean check
.PHONY: binary-minimal
binary-minimal: doc
binary-minimal: swagger
go build -tags minimal,containers_image_openpgp -v -ldflags "-X github.com/anuvu/zot/pkg/api.Commit=${COMMIT} -X github.com/anuvu/zot/pkg/api.BinaryType=minimal" -o bin/zot-minimal ./cmd/zot
.PHONY: binary
binary: doc
binary: swagger
go build -tags extended,containers_image_openpgp -v -ldflags "-X github.com/anuvu/zot/pkg/api.Commit=${COMMIT} -X github.com/anuvu/zot/pkg/api.BinaryType=extended" -o bin/zot ./cmd/zot
.PHONY: debug
debug: doc
debug: swagger
go build -tags extended,containers_image_openpgp -v -gcflags all='-N -l' -ldflags "-X github.com/anuvu/zot/pkg/api.Commit=${COMMIT} -X github.com/anuvu/zot/pkg/api.BinaryType=extended" -o bin/zot-debug ./cmd/zot
.PHONY: test
@@ -42,12 +42,12 @@ check: ./golangcilint.yaml
golangci-lint --version || curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s v1.26.0
golangci-lint --config ./golangcilint.yaml run --enable-all --build-tags extended,containers_image_openpgp ./cmd/... ./pkg/...
docs/docs.go:
swagger/docs.go:
swag -v || go install github.com/swaggo/swag/cmd/swag
swag init -g pkg/api/routes.go
swag init -o swagger -g pkg/api/routes.go
.PHONY: doc
doc: docs/docs.go
.PHONY: swagger
swagger: swagger/docs.go
.PHONY: update-licenses
update-licenses: