From 4a960995f76c2da1f8f0f2090d2b95d99bb54f1e Mon Sep 17 00:00:00 2001 From: Przemyslaw Hugh Kaznowski Date: Fri, 7 Feb 2025 01:56:49 +0000 Subject: [PATCH] dev: improved makefile for better build process (#13306) Co-authored-by: Hugh Kaznowski --- Makefile | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index c7e26647203..066d4568749 100644 --- a/Makefile +++ b/Makefile @@ -6,19 +6,28 @@ # Alternatively, you can set this variable in the .env file TARGET_DIR ?= deploy/ -# Note that the proper install script is located under ./Utils/build-and-package.pl -# and that should be used instead. This script is purely for convenience. -# The perl script bundles the artifacts into a single zip -.PHONY: install -install: - # Building project - mvn clean install package -DskipTests +.PHONY: clean +clean: + mvn clean + +.PHONY: build +build: + mvn install package -DskipTests + +.PHONY: package +package: # Packaging Mage.Client to zip - cd Mage.Client && mvn assembly:assembly + cd Mage.Client && mvn assembly:single # Packaging Mage.Server to zip - cd Mage.Server && mvn assembly:assembly + cd Mage.Server && mvn assembly:single # Copying the files to the target directory mkdir -p $(TARGET_DIR) cp ./Mage.Server/target/mage-server.zip $(TARGET_DIR) cp ./Mage.Client/target/mage-client.zip $(TARGET_DIR) +# Note that the proper install script is located under ./Utils/build-and-package.pl +# and that should be used instead. This script is purely for convenience. +# The perl script bundles the artifacts into a single zip +.PHONY: install +install: clean build package +