Use consistent make format.
@@ -77,15 +77,6 @@ configgen:
echo "" >> conf/st2.conf.sample
. $(VIRTUALENV_DIR)/bin/activate; python ./tools/config_gen.py >> conf/st2.conf.sample;
-.PHONY: .generate-openapi-spec
-.generate-openapi-spec:
- @echo
- @echo "================== Generate openapi.yaml file ===================="
- @echo
- echo "# NOTE: This file is auto-generated. Please edit st2common/st2common/openapi.yaml.j2" > st2common/st2common/openapi.yaml
- echo "# and then run make .generate-openapi-spec make target" >> st2common/st2common/openapi.yaml
- . virtualenv/bin/activate; st2common/bin/st2-generate-api-spec >> st2common/st2common/openapi.yaml
-
.PHONY: .pylint
.pylint:
@echo
@@ -124,14 +115,26 @@ lint-api-spec: requirements .lint-api-spec
@echo
@echo "================== Lint API spec ===================="
@echo
- . $(VIRTUALENV_DIR)/bin/activate; st2common/bin/st2-validate-api-spec --generate
+ . $(VIRTUALENV_DIR)/bin/activate; st2common/bin/st2-validate-api-spec
+
+.PHONY: generate-api-spec
+generate-api-spec: requirements .generate-api-spec
+
+.PHONY: .generate-api-spec
+.generate-api-spec:
+ @echo
+ @echo "================== Generate openapi.yaml file ===================="
+ @echo
+ echo "# NOTE: This file is auto-generated. Please edit st2common/st2common/openapi.yaml.j2" > st2common/st2common/openapi.yaml
+ echo "# and then run make .generate-api-spec make target to generate the final spec file" >> st2common/st2common/openapi.yaml
+ . virtualenv/bin/activate; st2common/bin/st2-generate-api-spec >> st2common/st2common/openapi.yaml
.PHONY: circle-lint-api-spec
circle-lint-api-spec:
@echo
@echo "================== Lint API spec ===================="
@echo
- . $(VIRTUALENV_DIR)/bin/activate; st2common/bin/st2-validate-api-spec --generate || echo "Open API spec lint failed."
+ . $(VIRTUALENV_DIR)/bin/activate; st2common/bin/st2-validate-api-spec || echo "Open API spec lint failed."
.PHONY: flake8
flake8: requirements .flake8
@@ -164,7 +167,7 @@ bandit: requirements .bandit
lint: requirements .lint
.PHONY: .lint
-.lint: .generate-openapi-spec .flake8 .pylint .bandit .st2client-dependencies-check .st2common-circular-dependencies-check .rst-check
+.lint: .generate-api-spec .flake8 .pylint .bandit .st2client-dependencies-check .st2common-circular-dependencies-check .rst-check
.PHONY: clean
clean: .cleanpycs
@@ -289,7 +292,7 @@ tests: pytests
pytests: compile requirements .flake8 .pylint .pytests-coverage
.PHONY: .pytests
-.pytests: compile .generate-openapi-spec .unit-tests .itests clean
+.pytests: compile .generate-api-spec .unit-tests .itests clean
.PHONY: .pytests-coverage
.pytests-coverage: .unit-tests-coverage-html .itests-coverage-html clean
