@@ -17,6 +17,12 @@ else ifeq ($(UNAME_S),Linux)
1717 DETECTED_OS := Linux
1818else ifeq ($(UNAME_S),Darwin)
1919 DETECTED_OS := MacOS
20+ else ifeq ($(findstring MINGW,$(UNAME_S)),MINGW)
21+ DETECTED_OS := Windows
22+ else ifeq ($(findstring MSYS,$(UNAME_S)),MSYS)
23+ DETECTED_OS := Windows
24+ else ifeq ($(findstring CYGWIN,$(UNAME_S)),CYGWIN)
25+ DETECTED_OS := Windows
2026else
2127 DETECTED_OS := Unknown
2228endif
@@ -64,12 +70,24 @@ test-integration: ## Run integration tests only
6470# #@ Code Quality
6571
6672format : # # Format code (Java and YAML)
67- @chmod +x format.sh
68- @./format.sh
73+ @if [ -f " format.sh" ]; then \
74+ chmod +x format.sh && ./format.sh; \
75+ elif [ -f " format.bat" ]; then \
76+ cmd //c format.bat; \
77+ else \
78+ echo " Error: No format script found (format.sh or format.bat)" ; \
79+ exit 1; \
80+ fi
6981
7082format-check : # # Verify code formatting
71- @chmod +x format.sh
72- @./format.sh
83+ @if [ -f " format.sh" ]; then \
84+ chmod +x format.sh && ./format.sh; \
85+ elif [ -f " format.bat" ]; then \
86+ cmd //c format.bat; \
87+ else \
88+ echo " Error: No format script found (format.sh or format.bat)" ; \
89+ exit 1; \
90+ fi
7391 @git diff --exit-code || (echo " Formatting issues detected. Run 'make format' to fix." && exit 1)
7492
7593lint : # # Run linting checks
@@ -200,10 +218,12 @@ install: ## Install and verify development tools
200218 @test -f google-java-format-1.28.0-all-deps.jar || \
201219 curl -L -o google-java-format-1.28.0-all-deps.jar \
202220 https://github.com/google/google-java-format/releases/download/v1.28.0/google-java-format-1.28.0-all-deps.jar
203- @chmod +x format.sh yamlfmt 2> /dev/null || true
221+ @if [ -f " format.sh" ]; then chmod +x format.sh; fi
222+ @if [ -d " yamlfmt" ]; then chmod +x yamlfmt/* 2> /dev/null || true ; fi
204223
205224verify : # # Verify development environment
206225 @echo " Detected OS: $( DETECTED_OS) "
226+ @echo " Format script: $( FORMAT_SCRIPT) "
207227 @java -version
208228 @$(GRADLE ) --version
209229 @docker --version
0 commit comments