From dc714534bc6cf6a40c496b1fe15209e23e7fcadd Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Thu, 12 Sep 2024 22:20:53 -0400 Subject: [PATCH] feat: Add project-level Makefile --- Makefile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..9c2fde2 --- /dev/null +++ b/Makefile @@ -0,0 +1,23 @@ +MAJOR_VERSION?=5 +PLUGINDEV_PROJECT_DIR?=/Users/andrew/webdev/sites/plugindev/cms_v${MAJOR_VERSION}/ +VENDOR?=nystudio107 +PROJECT_PATH?=${VENDOR}/$(shell basename $(CURDIR)) + +.PHONY: dev docs release + +# Start up the buildchain dev server +dev: + ${MAKE} -C buildchain/ dev +# Start up the docs dev server +docs: +# Run code quality tools, tests, and build the buildchain & docs in preparation for a release +release: --code-quality --code-tests --buildchain-clean-build --docs-clean-build +# The internal targets used by the dev & release targets +--buildchain-clean-build: + ${MAKE} -C buildchain/ clean + ${MAKE} -C buildchain/ build +--code-quality: + ${MAKE} -C ${PLUGINDEV_PROJECT_DIR} -- ecs check vendor/${PROJECT_PATH}/src --fix + ${MAKE} -C ${PLUGINDEV_PROJECT_DIR} -- phpstan analyze -c vendor/${PROJECT_PATH}/phpstan.neon +--code-tests: +--docs-clean-build: