Use make for calling various scripts correctly.
This commit is contained in:
parent
0d8283495d
commit
4da099ca74
4 changed files with 56 additions and 7 deletions
|
@ -6,3 +6,6 @@ insert_final_newline = true
|
||||||
charset = utf-8
|
charset = utf-8
|
||||||
indent_style = space
|
indent_style = space
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
|
|
||||||
|
[Makefile]
|
||||||
|
indent_style = tab
|
||||||
|
|
52
Makefile
Normal file
52
Makefile
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
PHP_EXE := $(shell which php8.4)
|
||||||
|
COMPOSER_EXE := $(shell which composer)
|
||||||
|
NODE_EXE := $(shell which node)
|
||||||
|
NPM_EXE := $(shell which npm)
|
||||||
|
SUDO_EXE := $(shell which sudo)
|
||||||
|
GIT_EXE := $(shell which git)
|
||||||
|
|
||||||
|
WWW_USER := www-data
|
||||||
|
BUILD_EXE := build.js
|
||||||
|
ENV_FILE := .env
|
||||||
|
TOOLS_DIR := tools
|
||||||
|
VENDOR_DIR := vendor
|
||||||
|
|
||||||
|
all: update migrate clear-cache build cron
|
||||||
|
|
||||||
|
update: composer npm
|
||||||
|
|
||||||
|
composer:
|
||||||
|
${PHP_EXE} ${COMPOSER_EXE} update
|
||||||
|
|
||||||
|
npm:
|
||||||
|
${NPM_EXE} update --save
|
||||||
|
|
||||||
|
migrate:
|
||||||
|
${SUDO_EXE} -u ${WWW_USER} ${PHP_EXE} ${TOOLS_DIR}/migrate
|
||||||
|
|
||||||
|
clear-cache:
|
||||||
|
${SUDO_EXE} -u ${WWW_USER} ${PHP_EXE} ${TOOLS_DIR}/nuke-tpl-cache
|
||||||
|
|
||||||
|
cron:
|
||||||
|
${SUDO_EXE} -u ${WWW_USER} ${PHP_EXE} ${TOOLS_DIR}/cron slow
|
||||||
|
|
||||||
|
build:
|
||||||
|
${NODE_EXE} --env-file ${ENV_FILE} ${BUILD_EXE}
|
||||||
|
|
||||||
|
rebuild-css:
|
||||||
|
${NODE_EXE} --env-file ${ENV_FILE} ${BUILD_EXE} css
|
||||||
|
|
||||||
|
rebuild-js:
|
||||||
|
${NODE_EXE} --env-file ${ENV_FILE} ${BUILD_EXE} js
|
||||||
|
|
||||||
|
rebuild-twig:
|
||||||
|
${NODE_EXE} --env-file ${ENV_FILE} ${BUILD_EXE} twig
|
||||||
|
|
||||||
|
analyse:
|
||||||
|
${PHP_EXE} ${VENDOR_DIR}/bin/phpstan
|
||||||
|
|
||||||
|
tag: analyse
|
||||||
|
${PHP_EXE} ${TOOLS_DIR}/create-tag
|
||||||
|
${GIT_EXE} push
|
||||||
|
|
||||||
|
.PHONY: all update composer npm build rebuild-css rebuild-js rebuild-twig migrate clear-cache cron analyse tag
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
20250403.2
|
20250411
|
||||||
|
|
|
@ -22,12 +22,6 @@
|
||||||
"Misuzu\\": "src"
|
"Misuzu\\": "src"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"scripts": {
|
|
||||||
"post-install-cmd": [
|
|
||||||
"./tools/migrate",
|
|
||||||
"./tools/cron slow"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpstan/phpstan": "~2.1"
|
"phpstan/phpstan": "~2.1"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue