master > master: code py - scripts, doc-building
- `just build-documentation` vom `just build` Befehl jetzt getrennt - wird nur mit `just dist` Befehl ausgeführt
This commit is contained in:
parent
2a5986d490
commit
8e59bc941f
@ -57,15 +57,11 @@ _generate-models path name:
|
||||
--input {{path}}/{{name}}-schema.yaml \
|
||||
--output {{path}}/generated/{{name}}.py
|
||||
|
||||
_generate-models-documentation path name:
|
||||
@- just _delete-if-folder-exists "docs/{{name}}"
|
||||
@- just _create-folder-if-not-exists "docs/{{name}}"
|
||||
_generate-models-documentation path_schema path_docs name:
|
||||
@- {{GEN_MODELS_DOCUMENTATION}} generate \
|
||||
--input-spec {{path}}/{{name}}-schema.yaml \
|
||||
--input-spec {{path_schema}}/{{name}}-schema.yaml \
|
||||
--generator-name markdown \
|
||||
--output "docs/{{name}}"
|
||||
@- just _clean-all-files .openapi-generator*
|
||||
@- just _clean-all-folders .openapi-generator*
|
||||
--output "{{path_docs}}/{{name}}"
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# TARGETS
|
||||
@ -75,27 +71,30 @@ _generate-models-documentation path name:
|
||||
# TARGETS: build
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
build: _build-requirements _build-skip-requirements
|
||||
_build-skip-requirements: build-models
|
||||
_build-requirements:
|
||||
build:
|
||||
@just build-requirements
|
||||
@just _check-system-requirements
|
||||
@just build-models
|
||||
build-requirements:
|
||||
@{{PYTHON}} -m pip install --disable-pip-version-check -r requirements.txt
|
||||
build-models:
|
||||
@just _check-system-requirements
|
||||
@just _build-models
|
||||
@just _build-models-documentation
|
||||
_build-models:
|
||||
@echo "Generate data models from schemata."
|
||||
@just _delete-if-folder-exists "models/generated"
|
||||
@just _create-folder-if-not-exists "models/generated"
|
||||
@- just _generate-models "models" "config"
|
||||
@- just _generate-models "models" "commands"
|
||||
_build-models-documentation:
|
||||
build-documentation:
|
||||
@echo "Generate documentations data models from schemata."
|
||||
@just _delete-if-folder-exists "docs"
|
||||
@just _create-folder-if-not-exists "docs"
|
||||
@- just _generate-models-documentation "models" "config"
|
||||
@- just _generate-models-documentation "models" "commands"
|
||||
@- just _generate-models-documentation "models" "docs" "config"
|
||||
@- just _generate-models-documentation "models" "docs" "commands"
|
||||
@- just _clean-all-files ".openapi-generator*"
|
||||
@- just _clean-all-folders ".openapi-generator*"
|
||||
|
||||
dist:
|
||||
@just build
|
||||
@just build-documentation
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# TARGETS: run
|
||||
|
Loading…
x
Reference in New Issue
Block a user