mirror of
https://github.com/lxc/incus.git
synced 2026-02-05 09:46:19 +01:00
[lxd-import] makefile: add update-metadata to generate JSON documentation and .TXT config options to the source
Signed-off-by: Gabriel Mougard <gabriel.mougard@canonical.com>
This commit is contained in:
committed by
Stéphane Graber
parent
822944ab6f
commit
a00e6c3eac
12
Makefile
12
Makefile
@@ -118,6 +118,12 @@ ifeq "$(INCUS_OFFLINE)" ""
|
||||
endif
|
||||
swagger generate spec -o doc/rest-api.yaml -w ./cmd/incusd -m
|
||||
|
||||
.PHONY: update-metadata
|
||||
update-metadata: build
|
||||
@echo "Generating golang documentation metadata"
|
||||
cd internal/server/config/generate && CGO_ENABLED=0 go build -o $(GOPATH)/bin/incus-doc
|
||||
$(GOPATH)/bin/incus-doc . --json ./internal/server/metadata/configuration.json --txt ./doc/config_options.txt
|
||||
|
||||
.PHONY: doc-setup
|
||||
doc-setup:
|
||||
@echo "Setting up documentation build environment"
|
||||
@@ -125,12 +131,6 @@ doc-setup:
|
||||
. $(SPHINXENV) ; pip install --upgrade -r doc/.sphinx/requirements.txt
|
||||
rm -Rf doc/html
|
||||
|
||||
.PHONY: generate-config
|
||||
generate-config:
|
||||
@echo "Generating golang documentation"
|
||||
cd internal/server/config/generate && CGO_ENABLED=0 go build -o $(GOPATH)/bin/incus-doc
|
||||
$(GOPATH)/bin/incus-doc . -y ./doc/config_options.yaml -t ./doc/config_options.txt
|
||||
|
||||
.PHONY: doc
|
||||
doc: doc-setup doc-incremental
|
||||
|
||||
|
||||
Reference in New Issue
Block a user