Skip to content

Commit

Permalink
pre-commit: Update to official checkmake fork (Fixes #23)
Browse files Browse the repository at this point in the history
Merged PRs: mrtazz/checkmake#69, and mrtazz/checkmake#70

These were released in `checkmake` version 0.2.2
  • Loading branch information
trinitronx committed Jul 17, 2024
1 parent 41ad4a5 commit 68e6d43
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ repos:
vendor/.*|
tmp/.*
)$
- repo: https://github.com/trinitronx/checkmake.git
rev: 0.2.5
- repo: https://github.com/mrtazz/checkmake.git
rev: 0.2.2
hooks:
- id: checkmake
30 changes: 15 additions & 15 deletions install/.uncommon-build-init.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,28 @@
.PHONY: stylish
stylish: ## no-help
ifeq (,$(wildcard .uncommon-build))
@echo "\033[44m🔍\033[0m \033[0;36m... Looking for .uncommon-build ... \033[0m" >&2
@echo "\033[0;101m👀\033[0;31m .uncommon-build is curiously missing... 🧐 installing submodule\033[0m" >&2
@echo -e "\033[44m🔍\033[0m \033[0;36m... Looking for .uncommon-build ... \033[0m" >&2
@echo -e "\033[0;101m👀\033[0;31m .uncommon-build is curiously missing... 🧐 installing submodule\033[0m" >&2
@git submodule add https://github.com/LyraPhase/uncommon-build.git .uncommon-build >&2
@echo "\033[0;101m✍️ \033[0;\033[0;31m Committing '.uncommon-build' and '.gitmodules'\033[0m" >&2
@echo -e "\033[0;101m✍️ \033[0;\033[0;31m Committing '.uncommon-build' and '.gitmodules'\033[0m" >&2
git add .uncommon-build .gitmodules && \
git commit -m 'uncommon-build install: Installing .uncommon-build as a submodule'
else
@# Ensure `.uncommon-build` is updated and committed in .gitmodules
@echo "\033[46m✨\033[0;\033[0;96m Updating '.uncommon-build' and '.gitmodules'\033[0m" >&2
@echo -e "\033[46m✨\033[0;\033[0;96m Updating '.uncommon-build' and '.gitmodules'\033[0m" >&2
git submodule update --init .uncommon-build >&2
endif
@[ -d .uncommon-build ] && echo "\033[47m🤵‍♂️\033[0m \033[1;92m.uncommon-build is now installed!\033[0m" \
|| echo "\033[41m🤦\033[0m\033[1;91m .uncommon-build installation had issues!\033[0m" >&2
@echo "\033[44m🔍\033[0m \033[0;36m... Looking for single-colon clean target in Makefile ... \033[0m" >&2
@clean_rules="$$(grep -c "clean::" Makefile)"; \
if [ "$${clean_rules}" -eq 0 ]; \
then \
echo "\033[40m🫧\033[0;\033[0;96m 'clean:' your colon! 👉 'clean::'\033[0m" >&2; \
sed -i '' -e "s/^clean:\([^:]*.*\)/clean::\1/" Makefile; \
echo "\033[0;101m✍️ \033[0;\033[0;31m Committing 'Makefile' with double-colon clean:: \033[0m" >&2; \
git add Makefile; \
git commit -m "uncommon-build install: Convert single-colon clean: to double-colon clean:: rule"; \
@[ -d .uncommon-build ] && echo -e "\033[47m🤵‍♂️\033[0m \033[1;92m.uncommon-build is now installed!\033[0m" \
|| echo -e "\033[41m🤦\033[0m\033[1;91m .uncommon-build installation had issues!\033[0m" >&2
@echo -e "\033[44m🔍\033[0m \033[0;36m... Looking for single-colon clean target in Makefile ... \033[0m" >&2
@clean_rules="$$(grep -c "clean::" Makefile)"; \
if [ "$${clean_rules}" -eq 0 ]; \
then \
echo -e "\033[40m🫧\033[0;\033[0;96m 'clean:' your colon! 👉 'clean::'\033[0m" >&2; \
sed -i '' -e "s/^clean:\([^:]*.*\)/clean::\1/" Makefile; \
echo -e "\033[0;101m✍️ \033[0;\033[0;31m Committing 'Makefile' with double-colon clean:: \033[0m" >&2; \
git add Makefile; \
git commit -m "uncommon-build install: Convert single-colon clean: to double-colon clean:: rule"; \
fi;

ifneq ("$(wildcard .uncommon-build/main.mk)","")
Expand Down

0 comments on commit 68e6d43

Please sign in to comment.