Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
name: Rust

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

jobs:
# Format check is platform-independent (rustfmt parses, doesn't compile), so
# run it once instead of per matrix platform.
# Nothing in the release build validates the metainfo, so this job is its only gate.
metainfo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- run: sudo apt-get update && sudo apt-get install -y appstream
- run: appstreamcli validate --no-net packaging/linux/de.u8array.zplab.metainfo.xml

# rustfmt parses without compiling, so one run covers every matrix platform.
fmt:
runs-on: ubuntu-latest
steps:
Expand Down
4 changes: 3 additions & 1 deletion src-tauri/packaging/flatpak/de.u8array.zplab.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Flathub manifest. Flathub builds this itself from the release deb, release.yml has no Flatpak leg.
# Flathub manifest. Flathub builds it from the release deb, so release.yml has no Flatpak leg.
app-id: de.u8array.zplab
runtime: org.gnome.Platform
runtime-version: "50"
Expand Down Expand Up @@ -33,6 +33,8 @@ modules:
# Tauri files the 256 px icon under a size no theme lookup reads.
- install -Dm644 usr/share/icons/hicolor/256x256@2/apps/ZPLab.png /app/share/icons/hicolor/256x256/apps/ZPLab.png
- install -Dm644 de.u8array.zplab.metainfo.xml /app/share/metainfo/de.u8array.zplab.metainfo.xml
# sed -i reports success on no match, so a missed rename would ship an unresolved launchable.
- grep -q '<launchable type="desktop-id">ZPLab.desktop</launchable>' /app/share/metainfo/de.u8array.zplab.metainfo.xml
# The packaged metainfo launches the deb's desktop file name.
- 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
sources:
Expand Down
5 changes: 5 additions & 0 deletions src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@
"icons/icon.ico"
],
"linux": {
"appimage": {
"files": {
"/usr/share/metainfo/de.u8array.zplab.metainfo.xml": "packaging/linux/de.u8array.zplab.metainfo.xml"
}
},
"deb": {
"files": {
"/usr/lib/udev/rules.d/70-zplab.rules": "packaging/udev/70-zplab.rules",
Expand Down
Loading