Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,20 @@ _WARNING := "\033[33m[%s]\033[0m %s\n" # Yellow text for "printf"
_TITLE := "\033[32m[%s]\033[0m %s\n" # Green text for "printf"
_ERROR := "\033[31m[%s]\033[0m %s\n" # Red text for "printf"

# Run a command and decorate output for handled exit codes (1 and 2).
# Usage: $(call RUN_WITH_DECORATED_EXIT_OUTPUT,<command>,<label>)
define RUN_WITH_DECORATED_EXIT_OUTPUT
@$(1); \
status=$$?; \
case "$$status" in \
0) exit 0 ;; \
1|2) \
printf "\033[1;31m[%s]\033[0;31m exited with code \033[1;33m%s\033[0;31m - see output above.\033[39m\n" "$(2)" "$$status"; \
exit 0 ;; \
*) exit "$$status" ;; \
esac
endef

info_msg := Message
info:
$(info_msg)
Expand Down Expand Up @@ -860,6 +874,18 @@ else
@cd docker/nginx/ssl && ./create-keys.sh
endif

check-action-updates: ## Check pinned GitHub Actions and available updates
ifeq ($(INSIDE_DOCKER_CONTAINER), 1)
@echo "\033[32mChecking GitHub Action pins and updates\033[39m"
$(call RUN_WITH_DECORATED_EXIT_OUTPUT,./scripts/check-action-updates.sh,check-action-updates)
else ifeq ($(strip $(RUNNING_SOME_CONTAINERS)),)
$(WARNING_DOCKER)
else
$(NOTICE_HOST)
@HOST_UID=$(HOST_UID) HOST_GID=$(HOST_GID) docker compose exec php make check-action-updates
endif


project-stats: ## Create simple project stats
project-stats: info_msg := @printf $(_TITLE) "OK" "Creating simple project stats"
project-stats: info
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ application with the frontend technology of your choice.

* [Resource index](doc/README.md)
* [Application commands](doc/COMMANDS.md)
* [GitHub Actions update guide](doc/ACTIONS_UPDATE.md)
* [Concepts and features](doc/CONCEPTS_AND_FEATURES.md)
* [Custom configuration](doc/CUSTOM_CONFIGURATION.md)
* [Development guide](doc/DEVELOPMENT.md)
Expand Down
Loading
Loading