Add make releases command

This commit is contained in:
Tobias Reisinger 2024-05-01 13:56:05 +02:00
parent b624e7394c
commit cd27f41b6b
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
3 changed files with 21 additions and 4 deletions

7
.gitignore vendored
View file

@ -2,7 +2,8 @@
/core /core
/controller /controller
/emgauwa-core.json /emgauwa-*.json
/emgauwa-controller.json /emgauwa-*.sqlite
/target /target
/out

5
Cross.toml Normal file
View file

@ -0,0 +1,5 @@
[build]
pre-build = [
"curl -Lo /usr/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64",
"chmod +x /usr/bin/yq"
]

View file

@ -1,7 +1,6 @@
configs: configs:
$(MAKE) -C core config $(MAKE) -C core config
ln -s core/emgauwa-core.json emgauwa-core.json ln -s core/emgauwa-core.json emgauwa-core.json
$(MAKE) -C controller config $(MAKE) -C controller config
ln -s controller/emgauwa-controller.json emgauwa-controller.json ln -s controller/emgauwa-controller.json emgauwa-controller.json
@ -14,3 +13,15 @@ clone-ssh:
git clone git@git.serguzim.me:emgauwa/common.git git clone git@git.serguzim.me:emgauwa/common.git
git clone git@git.serguzim.me:emgauwa/core.git git clone git@git.serguzim.me:emgauwa/core.git
git clone git@git.serguzim.me:emgauwa/controller.git git clone git@git.serguzim.me:emgauwa/controller.git
emgauwa-core_%:
$(TOOL) build --target $* --release
mkdir -p out/releases
cp target/$*/release/emgauwa-core out/releases/emgauwa-core_$*
cp target/$*/release/emgauwa-controller out/releases/emgauwa-controller_$*
releases:
$(MAKE) TOOL=cross emgauwa-core_arm-unknown-linux-gnueabihf
$(MAKE) TOOL=cargo emgauwa-core_x86_64-unknown-linux-gnu
$(MAKE) TOOL=cross emgauwa-core_x86_64-unknown-linux-musl