Skip to content

Commit 92b98bc

Browse files
committed
build(linux): the AppImage carries the metainfo, validated in the Rust workflow
1 parent f56c405 commit 92b98bc

3 files changed

Lines changed: 19 additions & 7 deletions

File tree

‎.github/workflows/rust.yml‎

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
name: Rust
22

3-
# Rust lives in src-tauri and is only compiled during a release build, so its
4-
# unit tests, clippy, and fmt never gated a PR. This runs them on every change
5-
# that touches the crate. Path-filtered so pure-frontend PRs don't pay the
6-
# (heavy) Tauri dependency compile.
3+
# src-tauri gets no other PR gate, because Rust and the packaging data only matter in a release build.
4+
# Path-filtered because the Tauri dependency compile is too heavy for pure-frontend PRs.
75
on:
86
pull_request:
97
branches: [main, prod]
@@ -17,8 +15,15 @@ defaults:
1715
working-directory: ./src-tauri
1816

1917
jobs:
20-
# Format check is platform-independent (rustfmt parses, doesn't compile), so
21-
# run it once instead of per matrix platform.
18+
# Nothing in the release build validates the metainfo, so this job is its only gate.
19+
metainfo:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v7
23+
- run: sudo apt-get update && sudo apt-get install -y appstream
24+
- run: appstreamcli validate --no-net packaging/linux/de.u8array.zplab.metainfo.xml
25+
26+
# rustfmt parses without compiling, so one run covers every matrix platform.
2227
fmt:
2328
runs-on: ubuntu-latest
2429
steps:

‎src-tauri/packaging/flatpak/de.u8array.zplab.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Flathub manifest. Flathub builds this itself from the release deb, release.yml has no Flatpak leg.
1+
# Flathub manifest. Flathub builds it from the release deb, so release.yml has no Flatpak leg.
22
app-id: de.u8array.zplab
33
runtime: org.gnome.Platform
44
runtime-version: "50"
@@ -33,6 +33,8 @@ modules:
3333
# Tauri files the 256 px icon under a size no theme lookup reads.
3434
- install -Dm644 usr/share/icons/hicolor/256x256@2/apps/ZPLab.png /app/share/icons/hicolor/256x256/apps/ZPLab.png
3535
- install -Dm644 de.u8array.zplab.metainfo.xml /app/share/metainfo/de.u8array.zplab.metainfo.xml
36+
# sed -i reports success on no match, so a missed rename would ship an unresolved launchable.
37+
- grep -q '<launchable type="desktop-id">ZPLab.desktop</launchable>' /app/share/metainfo/de.u8array.zplab.metainfo.xml
3638
# The packaged metainfo launches the deb's desktop file name.
3739
- sed -i 's#<launchable type="desktop-id">ZPLab.desktop</launchable>#<launchable type="desktop-id">de.u8array.zplab.desktop</launchable>#' /app/share/metainfo/de.u8array.zplab.metainfo.xml
3840
sources:

‎src-tauri/tauri.conf.json‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@
5858
"icons/icon.ico"
5959
],
6060
"linux": {
61+
"appimage": {
62+
"files": {
63+
"/usr/share/metainfo/de.u8array.zplab.metainfo.xml": "packaging/linux/de.u8array.zplab.metainfo.xml"
64+
}
65+
},
6166
"deb": {
6267
"files": {
6368
"/usr/lib/udev/rules.d/70-zplab.rules": "packaging/udev/70-zplab.rules",

0 commit comments

Comments
 (0)