]> Git [git.vados.ru] :: Repos - Mikrotiks/ros.vados.ru.git/commitdiff
Autocommit in repo: ros.vados.ru, generated by owner: root, in 21:28:49 08.03.2026.
authorvados-dev <vados@vados.ru>
Sun, 8 Mar 2026 18:28:50 +0000 (21:28 +0300)
committervados-dev <vados@vados.ru>
Sun, 8 Mar 2026 18:28:50 +0000 (21:28 +0300)
Makefile
html/AM-GlobalFunc.rsc

index fe3f41ccde30757f94e5ba526da06a31a168ea57..49a1741462f4f603b0ed1d3fe95043f697e5742a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,7 @@
 # Makefile
 
 BUILD_DIR       = $(shell pwd)
+
 BIN_DIR         = bin
 commitinfo.sh   := $(wildcard bin/commitinfo.sh)
 
@@ -40,20 +41,66 @@ COMM_INFO       := $(shell echo -e "Autocommit in repo: $(COMM_REPO), generated
 
 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 \
index 018d731e123768b9dd669375458895ededc20c78..54b121e5a5427b68e2aba79d51c7fd44edb90fc8 100644 (file)
@@ -16,9 +16,9 @@
 :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;