-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
63 lines (47 loc) · 2.37 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/bash
set -e -o pipefail
APP_ID="co.casterlabs.caffeinated"
APP_NAME="Casterlabs-Caffeinated-Updater"
MAIN_CLASS="co.casterlabs.caffeinated.updater.Launcher"
if [[ $@ == *"compile"* ]]; then
echo "------------ Compiling app ------------"
mvn clean package
echo "------------ Finishing compiling app ---------"
fi
if [[ $@ == *"dist-windows"* ]]; then
echo "------------ Bundling for Windows ------------"
java -jar bundler.jar bundle \
--arch x86_64 --os windows \
--id $APP_ID --name $APP_NAME --icon icon.png \
--sign "cmd.exe /C C:\signing\sign.bat $APP_NAME.exe" \
--java 11 --arg=-Dcaffeinated.channel=stable --dependency target/Casterlabs-Caffeinated-Updater.jar --main $MAIN_CLASS
echo "------------ Finished bundling for Windows ------------"
fi
if [[ $@ == *"dist-macos"* ]]; then
echo "------------ Bundling for macOS ------------"
java -jar bundler.jar bundle \
--arch aarch64 --os macos \
--id $APP_ID --name $APP_NAME --icon icon.png \
--java 11 --arg=-Dcaffeinated.channel=stable --dependency target/Casterlabs-Caffeinated-Updater.jar --main $MAIN_CLASS
java -jar bundler.jar bundle \
--arch x86_64 --os macos \
--id $APP_ID --name $APP_NAME --icon icon.png \
--java 11 --arg=-Dcaffeinated.channel=stable --dependency target/Casterlabs-Caffeinated-Updater.jar --main $MAIN_CLASS
echo "------------ Finished bundling for macOS ------------"
fi
if [[ $@ == *"dist-linux"* ]]; then
echo "------------ Bundling for Linux ------------"
java -jar bundler.jar bundle \
--arch aarch64 --os gnulinux \
--id $APP_ID --name $APP_NAME --icon icon.png \
--java 11 --arg=-Dcaffeinated.channel=stable --dependency target/Casterlabs-Caffeinated-Updater.jar --main $MAIN_CLASS
java -jar bundler.jar bundle \
--arch arm --os gnulinux \
--id $APP_ID --name $APP_NAME --icon icon.png \
--java 11 --arg=-Dcaffeinated.channel=stable --dependency target/Casterlabs-Caffeinated-Updater.jar --main $MAIN_CLASS
java -jar bundler.jar bundle \
--arch x86_64 --os gnulinux \
--id $APP_ID --name $APP_NAME --icon icon.png \
--java 11 --arg=-Dcaffeinated.channel=stable --dependency target/Casterlabs-Caffeinated-Updater.jar --main $MAIN_CLASS
echo "------------ Finished bundling for Linux ------------"
fi