From 84a43ab7b1f2cd31cce5689720f3ab2ad5b89c67 Mon Sep 17 00:00:00 2001 From: Bert Frees Date: Fri, 9 Dec 2022 14:35:38 +0100 Subject: [PATCH] Fix build on Windows: "mvn" executable does not exist It can only be used instead of mvn.cmd when run in a shell. --- .github/workflows/windows.yml | 4 ++-- Makefile | 9 +++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 45d6af07..9cc1cfd3 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -24,6 +24,6 @@ jobs: key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} restore-keys: | ${{ runner.os }}-maven- - - name: Build .deb file + - name: Build Windows ZIP distribution shell: cmd - run: .\\make.exe deb + run: .\\make.exe zip-win diff --git a/Makefile b/Makefile index 6f7a6a77..b370d69d 100644 --- a/Makefile +++ b/Makefile @@ -9,10 +9,15 @@ SHELL := make/eval-java endif .SHELLFLAGS := +OS := $(shell println(getOS());) + +ifeq ($(OS), WINDOWS) +MVN ?= mvn.cmd +else MVN ?= mvn -DOCKER := docker +endif -OS := $(shell println(getOS());) +DOCKER := docker .PHONY : default ifeq ($(OS), WINDOWS)