# Makefile
BUILD_DIR = $(shell pwd)
+
BIN_DIR = bin
commitinfo.sh := $(wildcard bin/commitinfo.sh)
export BUILD_DIR BIN_DIR HTML_DIR DATE DTSTAMP VERSION COMMIT_ID COMM_TAG COMM_HASH COMM_INFO
-.PHONY: all checksums commit check-uncommitted commitinfo clean
+.ONESHELL:
+SHELL := /bin/bash
+.DEFAULT_GOAL := run
+
+export BUILD_DIR BIN_DIR HTML_DIR DATE DTSTAMP VERSION COMMIT_ID COMM_TAG COMM_HASH COMM_INFO
+
+include $(BUILD_DIR)/.config/config.mk
+
+.PHONY: run check notify test
+
+run: check
+ @echo "[run] start main flow"
+ # ...
+ @echo "[run] done"
+
+check:
+ @bash bin/check_repo.sh
-all: checksums commit commitinfo
+notify:
+ @bash bin/notify_telegram.sh "manual notify from make"
+
+test:
+ @bash -n bin/check_repo.sh
+ @bash -n bin/notify_telegram.sh
+ @echo "syntax ok"
+
+
+.DEFAULT_GOAL := all
+.PHONY: all checksums git-check commitinfo clean
+
+define run-git =
+ git $@
+endef
+
+all: checksums git-check commitinfo
checksums: checksums.json
checksums.json: bin/checksums.sh $(ALL_RSC)
bin/checksums.sh > html/tmp/$@
-commit: check-uncommitted
- @echo "Warning: Uncommitted changes detected! Go to autocommit steps..."
- git branch -v
- git commit -am "$(COMM_INFO)"
- git push
+gitcheck: $(BUILD_DIR)
+ cd $ &&
+ @if git diff --quiet && git diff --cached --quiet && [ -z "$$(git ls-files --others --exclude-standard)" ]; then \
+ echo "The first checks have been passed, the repo seems to be clean... But... Still, let's check a little more!"; \
+ git add . && ; \
+ if [[ -n git status --porcelain ]]; then \
+ echo "Uncommitted changes detected! Commit it..."; \
+# git commit -m "$(COMM_INFO)"; \
+# git push; \
+ exit 1; \
+ else \
+ echo "repo clean"; \
+ fi \
+ else \
+ @echo "Warning: Uncommitted changes detected! Go to autocommit steps..."; \
+# git branch -v; \
+# git commit -am "$(COMM_INFO)"; \
+# git push; \
+ fi
#@if [ -n "$$(git diff --quiet)" ] && [ -n "$$(git diff --cached --quiet)" ] && [ -n "$$(git ls-files --others --exclude-standard)" ]; then \
:global GlobalFuncReady false;
# Git commit id & info, expected configuration version
-:global CommitId "main/39/855eef58";
-:global CommitTAG "unknown";
-:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 18:42:26 06.03.2026.";
+:global CommitId "main/47/7d1c7a3e";
+:global CommitTAG "1ea0624";
+:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 21:01:07 08.03.2026.";
# The variables are received right here.
:global GlobalConfVersion 138;