From 83c65c00fe4c9b0f7aa0e7094ab8137548140848 Mon Sep 17 00:00:00 2001 From: Tobias Reisinger Date: Mon, 29 Apr 2024 18:32:16 +0200 Subject: [PATCH] Add pre-ci release-binary creation --- .gitignore | 2 +- Makefile | 24 ++++++++++++++++++++++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 77c0b68..5a43d74 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ /target -/pkl-out +/out /.env /api.http diff --git a/Makefile b/Makefile index c452a85..3ead12b 100644 --- a/Makefile +++ b/Makefile @@ -15,11 +15,31 @@ configs: $(MAKE) emgauwa-controller.json pkl-package: - pkl project package config --output-path "./pkl-out" + pkl project package config --output-path "./out/pkl" clean: rm -f emgauwa-controller.json rm -f emgauwa-controller.sqlite rm -f emgauwa-core.json rm -f emgauwa-core.sqlite - rm -f emgauwa-dev.sqlite \ No newline at end of file + rm -f emgauwa-dev.sqlite + +emgauwa-controller_%: + $(TOOL) build --target $* --release --bin emgauwa-controller + mkdir -p out/releases + cp target/$*/release/emgauwa-controller out/releases/emgauwa-controller_$* + +emgauwa-core_%: + $(TOOL) build --target $* --release --bin emgauwa-core + mkdir -p out/releases + cp target/$*/release/emgauwa-core out/releases/emgauwa-core_$* + +emgauwa_%: + $(MAKE) emgauwa-controller_$* + $(MAKE) emgauwa-core_$* + +releases: + $(MAKE) TOOL=cross emgauwa_arm-unknown-linux-gnueabihf + $(MAKE) TOOL=cargo emgauwa_x86_64-unknown-linux-gnu + $(MAKE) TOOL=cross emgauwa_x86_64-unknown-linux-musl +