2023-12-24 03:52:52 +01:00
|
|
|
SHELL := /bin/sh
|
|
|
|
.POSIX: # enable POSIX compatibility
|
|
|
|
.SUFFIXES: # no special suffixes
|
|
|
|
.DEFAULT_GOAL := default
|
|
|
|
|
2024-02-01 22:04:00 +01:00
|
|
|
# dummy entry to force make to do nothing by default
|
2023-12-24 03:52:52 +01:00
|
|
|
.PHONY: default
|
|
|
|
default:
|
|
|
|
@echo "Please choose target explicitly."
|
|
|
|
|
2024-02-01 22:04:00 +01:00
|
|
|
# git helper: push current branch to configured remotes
|
|
|
|
.PHONY: git_push_current_branch
|
|
|
|
git_push_current_branch:
|
2024-01-18 00:25:51 +01:00
|
|
|
git remote | xargs -L1 git push --verbose
|
|
|
|
|
2024-02-01 22:04:00 +01:00
|
|
|
# git helper: push all tags to all configured remotes
|
2024-01-18 00:25:51 +01:00
|
|
|
.PHONY: git_push_tags
|
|
|
|
git_push_tags:
|
2023-12-24 03:52:52 +01:00
|
|
|
git remote | xargs -L1 git push --verbose --tags
|
2023-12-27 04:17:06 +01:00
|
|
|
|
2024-02-01 22:43:03 +01:00
|
|
|
# clean all temporary files (cache, logs, etc)
|
|
|
|
.PHONY: clean_all
|
2024-02-06 12:50:56 +01:00
|
|
|
clean_all: website_clean_all
|
2024-02-01 22:04:00 +01:00
|
|
|
|
2024-02-12 00:19:06 +01:00
|
|
|
# lint all `composer.json` files
|
|
|
|
.PHONY: lint_composer_config
|
|
|
|
lint_composer_config:
|
|
|
|
composer --strict --no-check-version --working-dir=modules/core validate
|
|
|
|
composer --strict --no-check-version --working-dir=modules/storage validate
|
|
|
|
composer --strict --no-check-version --working-dir=website validate
|
|
|
|
|
2024-02-11 23:56:44 +01:00
|
|
|
# lint all files against EditorConfig settings
|
2024-02-01 23:00:06 +01:00
|
|
|
.PHONY: lint_editorconfig
|
2024-02-05 21:46:52 +01:00
|
|
|
lint_editorconfig:
|
2024-02-14 23:32:03 +01:00
|
|
|
docker container run --rm --user=$$(id --user):$$(id --group) --volume=$$PWD:/check mstruebing/editorconfig-checker:2.7.2
|
2024-02-01 23:00:06 +01:00
|
|
|
|
2024-02-11 23:56:44 +01:00
|
|
|
# lint PHP coding style across all directories
|
2024-02-01 22:07:18 +01:00
|
|
|
.PHONY: lint_coding_style
|
2024-02-06 12:50:56 +01:00
|
|
|
lint_coding_style:
|
2024-02-14 23:49:16 +01:00
|
|
|
docker container run --rm --user=$$(id --user):$$(id --group) --volume=$$PWD:/code ghcr.io/php-cs-fixer/php-cs-fixer:3.49-php8.3 check --verbose --show-progress=dots
|
2024-02-01 22:07:18 +01:00
|
|
|
|
2024-02-11 23:56:44 +01:00
|
|
|
# fix PHP coding style across all directories
|
2024-02-09 23:41:53 +01:00
|
|
|
.PHONY: fix_coding_style
|
|
|
|
fix_coding_style:
|
2024-02-14 23:49:16 +01:00
|
|
|
docker container run --rm --user=$$(id --user):$$(id --group) --volume=$$PWD:/code ghcr.io/php-cs-fixer/php-cs-fixer:3.49-php8.3 fix --verbose --show-progress=dots
|
2024-02-09 23:41:53 +01:00
|
|
|
|
2024-02-01 22:43:03 +01:00
|
|
|
# website: clean all temporary files (cache, logs, etc)
|
|
|
|
.PHONY: website_clean_all
|
|
|
|
website_clean_all: website_clean_assets website_clean_cache website_clean_logs
|
|
|
|
|
2024-02-01 22:04:00 +01:00
|
|
|
# website: install dependencies defined for assets
|
|
|
|
.PHONY: website_install_asset_dependencies
|
|
|
|
website_install_asset_dependencies:
|
2023-12-31 19:31:06 +01:00
|
|
|
php website/bin/console -vvv importmap:install
|
|
|
|
|
2024-02-01 22:04:00 +01:00
|
|
|
# website: compile assets for production environment
|
|
|
|
.PHONY: website_compile_assets
|
|
|
|
website_compile_assets:
|
2023-12-31 19:31:06 +01:00
|
|
|
php website/bin/console -vvv asset-map:compile
|
|
|
|
|
2024-02-01 22:04:00 +01:00
|
|
|
# website: remove all compiled assets
|
|
|
|
.PHONY: website_clean_assets
|
|
|
|
website_clean_assets:
|
2023-12-31 19:31:06 +01:00
|
|
|
rm --force --recursive --verbose website/public/assets/*
|
|
|
|
|
2024-02-01 22:04:00 +01:00
|
|
|
# website: remove all cache files
|
|
|
|
.PHONY: website_clean_cache
|
|
|
|
website_clean_cache:
|
2023-12-27 04:17:06 +01:00
|
|
|
rm --force --recursive --verbose website/var/cache
|
|
|
|
|
2024-02-01 22:04:00 +01:00
|
|
|
# website: remove all log files
|
|
|
|
.PHONY: website_clean_logs
|
|
|
|
website_clean_logs:
|
2023-12-27 04:17:06 +01:00
|
|
|
rm --force --recursive --verbose website/var/log
|
|
|
|
|
2024-02-01 22:04:00 +01:00
|
|
|
# website: lint all Twig templates
|
|
|
|
.PHONY: website_lint_twig_templates
|
|
|
|
website_lint_twig_templates:
|
2023-12-31 23:33:39 +01:00
|
|
|
website/bin/console lint:twig -vvv --show-deprecations
|