add makefile for creating releases

This commit is contained in:
Crispy 2023-07-14 20:02:35 +02:00
parent fc209a78ad
commit 153d10ba7a
2 changed files with 22 additions and 1 deletions

5
.gitignore vendored
View file

@ -1,4 +1,7 @@
/target /target
*.zip
*.xz
*.png *.png
!images/*.png !images/*
fractal_settings.json fractal_settings.json

18
Makefile Normal file
View file

@ -0,0 +1,18 @@
APP_NAME=julia-fractal-renderer
WIN_TARGET=x86_64-pc-windows-gnu
RELEASE_W=target/$(WIN_TARGET)/release
RELEASE_L=target/release
release: release_windows release_linux
release_linux:
cargo build --release
cd $(RELEASE_L) && tar -caf $(APP_NAME)-linux.tar.xz $(APP_NAME)
mv $(RELEASE_L)/$(APP_NAME)-linux.tar.xz .
release_windows:
cargo build --release --target $(WIN_TARGET)
cd $(RELEASE_W) && zip -9 $(APP_NAME)-windows.zip $(APP_NAME).exe
mv $(RELEASE_W)/$(APP_NAME)-windows.zip .