diff --git a/Makefile b/Makefile index dc2c42a..f6f8cf2 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,16 @@ .PHONY: up down seed logs build test +# GNU Make for Windows dispatches recipes through cmd.exe and does not honor +# a Makefile SHELL reassignment for that dispatch, so cmd chokes on `./mvnw` +# and `chmod`. Route recipes through Git Bash explicitly instead of relying +# on `bash` resolving on PATH — on machines with WSL installed, plain `bash` +# can resolve to the WSL launcher stub ahead of Git Bash. +ifeq ($(OS),Windows_NT) +BASH := "C:/Program Files/Git/bin/bash.exe" +else +BASH := bash +endif + up: docker compose up -d @@ -7,13 +18,13 @@ down: docker compose down seed: - @chmod +x scripts/bootstrap.sh && ./scripts/bootstrap.sh + @$(BASH) -c "chmod +x scripts/bootstrap.sh && ./scripts/bootstrap.sh" build: - ./mvnw install -DskipTests + $(BASH) -c "./mvnw install -DskipTests" test: - ./mvnw verify + $(BASH) -c "./mvnw verify" logs: docker compose logs -f