Skip to content

Commit 9dc5981

Browse files
authored
Replace linux-all with linux-assets (#381)
* Move linux package specific files to scripts/resources/pkg * Replace linux-all with linux-assets * Fix linux-x64 launchers issue * Remove -e
1 parent 21c087e commit 9dc5981

14 files changed

+57
-42
lines changed

.github/workflows/build_push.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ jobs:
8181
fail-fast: false
8282
matrix:
8383
os:
84+
- debian-all
85+
- linux-assets
8486
- linux-x64
85-
- linux-all
8687
- macOS-x64
8788
- macOS-arm64
88-
- debian-all
8989
- windows-x64
9090
- windows-x86
9191

@@ -133,23 +133,23 @@ jobs:
133133
path: release
134134
- uses: actions/download-artifact@v3
135135
with:
136-
name: linux-x64
136+
name: debian-all
137137
path: release
138138
- uses: actions/download-artifact@v3
139139
with:
140-
name: linux-all
140+
name: linux-assets
141141
path: release
142142
- uses: actions/download-artifact@v3
143143
with:
144-
name: macOS-x64
144+
name: linux-x64
145145
path: release
146146
- uses: actions/download-artifact@v3
147147
with:
148-
name: macOS-arm64
148+
name: macOS-x64
149149
path: release
150150
- uses: actions/download-artifact@v3
151151
with:
152-
name: debian-all
152+
name: macOS-arm64
153153
path: release
154154
- uses: actions/download-artifact@v3
155155
with:

.github/workflows/publish.yml

+15-15
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
- name: Validate Gradle Wrapper
1818
uses: gradle/wrapper-validation-action@v1
19-
19+
2020
build:
2121
name: Build Jar
2222
needs: check_wrapper
@@ -81,15 +81,15 @@ jobs:
8181
strategy:
8282
fail-fast: false
8383
matrix:
84-
os: [
85-
linux-x64,
86-
linux-all,
87-
macOS-x64,
88-
macOS-arm64,
89-
debian-all,
90-
windows-x64,
91-
windows-x86,
92-
]
84+
os:
85+
- debian-all
86+
- linux-assets
87+
- linux-x64
88+
- macOS-x64
89+
- macOS-arm64
90+
- windows-x64
91+
- windows-x86
92+
9393
name: Make ${{ matrix.os }} release
9494
needs: build
9595
runs-on: ubuntu-latest
@@ -135,23 +135,23 @@ jobs:
135135
path: release
136136
- uses: actions/download-artifact@v3
137137
with:
138-
name: linux-x64
138+
name: debian-all
139139
path: release
140140
- uses: actions/download-artifact@v3
141141
with:
142-
name: linux-all
142+
name: linux-assets
143143
path: release
144144
- uses: actions/download-artifact@v3
145145
with:
146-
name: macOS-x64
146+
name: linux-x64
147147
path: release
148148
- uses: actions/download-artifact@v3
149149
with:
150-
name: macOS-arm64
150+
name: macOS-x64
151151
path: release
152152
- uses: actions/download-artifact@v3
153153
with:
154-
name: debian-all
154+
name: macOS-arm64
155155
path: release
156156
- uses: actions/download-artifact@v3
157157
with:

scripts/bundler.sh

+7-8
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,8 @@ main() {
4242
make_deb_package
4343
move_release_to_output_dir
4444
;;
45-
linux-all)
45+
linux-assets)
4646
RELEASE="$RELEASE_NAME.tar.gz"
47-
cp "$JAR" "$RELEASE_NAME/tachidesk-server.jar"
4847
copy_linux_package_assets_to "$RELEASE_NAME/"
4948
tar -I "gzip -9" -cvf "$RELEASE" "$RELEASE_NAME/"
5049
move_release_to_output_dir
@@ -151,11 +150,11 @@ copy_linux_package_assets_to() {
151150
local output_dir
152151
output_dir="$(readlink -e "$1" || exit 1)"
153152

154-
cp "scripts/resources/tachidesk-server-browser-launcher.sh" "$output_dir/"
155-
cp "scripts/resources/tachidesk-server-debug-launcher.sh" "$output_dir/"
156-
cp "scripts/resources/tachidesk-server-electron-launcher.sh" "$output_dir/"
157-
cp "scripts/resources/tachidesk-server.desktop" "$output_dir/"
158-
cp "scripts/resources/systemd"/* "$output_dir/"
153+
cp "scripts/resources/pkg/tachidesk-server-browser-launcher.sh" "$output_dir/"
154+
cp "scripts/resources/pkg/tachidesk-server-debug-launcher.sh" "$output_dir/"
155+
cp "scripts/resources/pkg/tachidesk-server-electron-launcher.sh" "$output_dir/"
156+
cp "scripts/resources/pkg/tachidesk-server.desktop" "$output_dir/"
157+
cp "scripts/resources/pkg/systemd"/* "$output_dir/"
159158
cp "server/src/main/resources/icon/faviconlogo.png" \
160159
"$output_dir/tachidesk-server.png"
161160
}
@@ -274,7 +273,7 @@ make_windows_package() {
274273
# set -e is not recommended and unpredictable.
275274
# see https://stackoverflow.com/questions/64786/error-handling-in-bash
276275
# and http://mywiki.wooledge.org/BashFAO/105
277-
set -euo pipefail
276+
set -uo pipefail
278277
error() {
279278
local parent_lineno="$1"
280279
local message="$2"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
3+
exec /usr/bin/java -jar /usr/share/java/tachidesk-server/tachidesk-server.jar
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
3+
exec /usr/bin/java \
4+
-Dsuwayomi.tachidesk.config.server.debugLogsEnabled=true \
5+
-jar /usr/share/java/tachidesk-server/tachidesk-server.jar
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/sh
2+
3+
if [ ! -f /usr/bin/electron ]; then
4+
echo "Electron executable was not found!
5+
In order to run this launcher, you need Electron installed."
6+
exit 1
7+
fi
8+
9+
exec /usr/bin/java \
10+
-Dsuwayomi.tachidesk.config.server.webUIInterface=electron \
11+
-Dsuwayomi.tachidesk.config.server.electronPath=/usr/bin/electron \
12+
-jar /usr/share/java/tachidesk-server/tachidesk-server.jar
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
#!/bin/sh
2-
exec /usr/bin/java -jar /usr/share/java/tachidesk-server/tachidesk-server.jar
2+
3+
exec ./jre/bin/java -jar ./tachidesk-server.jar
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/sh
2-
exec /usr/bin/java \
2+
3+
exec ./jre/bin/java \
34
-Dsuwayomi.tachidesk.config.server.debugLogsEnabled=true \
4-
-jar /usr/share/java/tachidesk-server/tachidesk-server.jar
5+
-jar ./tachidesk-server.jar
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
#!/bin/sh
22

3-
if [ ! -f /usr/bin/electron ]; then
4-
echo "Electron executable was not found!
5-
In order to run this launcher, you need Electron installed."
6-
exit 1
7-
fi
8-
9-
exec /usr/bin/java \
3+
exec ./jre/bin/java \
104
-Dsuwayomi.tachidesk.config.server.webUIInterface=electron \
11-
-Dsuwayomi.tachidesk.config.server.electronPath=/usr/bin/electron \
12-
-jar /usr/share/java/tachidesk-server/tachidesk-server.jar
5+
-Dsuwayomi.tachidesk.config.server.electronPath=./electron/electron \
6+
-jar ./tachidesk-server.jar

0 commit comments

Comments
 (0)