mirror of
https://github.com/priyanshujain/margin-mail.git
synced 2026-10-02 11:07:06 +00:00
fix Windows fixtures and Flatpak CI packaging
This commit is contained in:
1 parent
eb59cb5f8d
commit
c2a117ca02
8 files changed
+33
-7
No files matched your search
@@ -0,0 +1,3 @@
|
|||||||
|
# MIME fixtures and golden renders contain intentional CRLF and mixed line endings.
|
||||||
|
# Preserve their bytes on Windows too; checkout conversion breaks exact comparisons.
|
||||||
|
src-tauri/fixtures/** -text
|
||||||
@@ -167,8 +167,7 @@ jobs:
|
|||||||
libxdo-dev \
|
libxdo-dev \
|
||||||
libssl-dev \
|
libssl-dev \
|
||||||
build-essential \
|
build-essential \
|
||||||
flatpak \
|
flatpak
|
||||||
flatpak-builder
|
|
||||||
|
|
||||||
- uses: actions/setup-node@v6
|
- uses: actions/setup-node@v6
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -240,7 +240,7 @@ jobs:
|
|||||||
|
|
||||||
- run: |
|
- run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y flatpak flatpak-builder
|
sudo apt-get install -y flatpak
|
||||||
|
|
||||||
- name: Build the flatpak from the published deb
|
- name: Build the flatpak from the published deb
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -105,6 +105,11 @@ against. The sandbox gets the network, the notification service and the download
|
|||||||
nothing else. CI builds the same manifest on every push to main, against a deb built there, which
|
nothing else. CI builds the same manifest on every push to main, against a deb built there, which
|
||||||
is the only way a break in it gets found before a release.
|
is the only way a break in it gets found before a release.
|
||||||
|
|
||||||
|
On Linux, `just flatpak` builds the deb and repackages it locally. Install `flatpak` first; the
|
||||||
|
build script installs the GNOME runtime and `org.flatpak.Builder` from Flathub for your user.
|
||||||
|
Both CI and local builds use that builder because Ubuntu 22.04's `flatpak-builder` calls the old
|
||||||
|
`appstream-compose` tool, which the GNOME 48 SDK no longer includes.
|
||||||
|
|
||||||
The **nix** job runs after the publish, so the flake can only ever point at a release that survived
|
The **nix** job runs after the publish, so the flake can only ever point at a release that survived
|
||||||
the manifest check. It hashes the published deb into `nix/release.json`, builds the package to
|
the manifest check. It hashes the published deb into `nix/release.json`, builds the package to
|
||||||
prove the pin works, and commits the pin to main. `NIXPKGS_ALLOW_UNFREE` and `--impure` are in that
|
prove the pin works, and commits the pin to main. `NIXPKGS_ALLOW_UNFREE` and `--impure` are in that
|
||||||
|
|||||||
+4
-1
@@ -18,11 +18,14 @@ runtime_version=$(sed -n "s/^runtime-version: *'\(.*\)'/\1/p" "$id.yml")
|
|||||||
# --user so nothing here needs root, and --if-not-exists so a second run is free.
|
# --user so nothing here needs root, and --if-not-exists so a second run is free.
|
||||||
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||||
flatpak install --user --noninteractive flathub \
|
flatpak install --user --noninteractive flathub \
|
||||||
|
org.flatpak.Builder \
|
||||||
"org.gnome.Platform//$runtime_version" \
|
"org.gnome.Platform//$runtime_version" \
|
||||||
"org.gnome.Sdk//$runtime_version"
|
"org.gnome.Sdk//$runtime_version"
|
||||||
|
|
||||||
rm -rf build repo
|
rm -rf build repo
|
||||||
flatpak-builder --user --disable-rofiles-fuse --force-clean --repo=repo build "$id.yml"
|
# Ubuntu 22.04's builder calls appstream-compose, which GNOME 48 no longer ships.
|
||||||
|
# Use the Flathub builder for its current AppStream support on CI and local builds alike.
|
||||||
|
flatpak run org.flatpak.Builder --user --disable-rofiles-fuse --force-clean --repo=repo build "$id.yml"
|
||||||
flatpak build-bundle repo "$bundle" "$id"
|
flatpak build-bundle repo "$bundle" "$id"
|
||||||
|
|
||||||
echo "Wrote $bundle"
|
echo "Wrote $bundle"
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
<summary>A calm, keyboard-first mail client for Gmail</summary>
|
<summary>A calm, keyboard-first mail client for Gmail</summary>
|
||||||
|
|
||||||
<metadata_license>CC0-1.0</metadata_license>
|
<metadata_license>CC0-1.0</metadata_license>
|
||||||
<project_license>LicenseRef-proprietary=https://github.com/priyanshujain/margin-mail/blob/main/LICENSE</project_license>
|
<project_license>LicenseRef-FSL-1.1-MIT=https://github.com/priyanshujain/margin-mail/blob/main/LICENSE</project_license>
|
||||||
|
|
||||||
<developer id="studio.margin">
|
<developer id="studio.margin">
|
||||||
<name>Margin</name>
|
<name>Margin</name>
|
||||||
|
|||||||
@@ -39,9 +39,13 @@ modules:
|
|||||||
# after the product and the binary, so both are renamed on the way in.
|
# after the product and the binary, so both are renamed on the way in.
|
||||||
- install -Dm644 "deb/usr/share/applications/Margin Mail.desktop" /app/share/applications/studio.margin.mail.desktop
|
- install -Dm644 "deb/usr/share/applications/Margin Mail.desktop" /app/share/applications/studio.margin.mail.desktop
|
||||||
- desktop-file-edit --set-icon=studio.margin.mail /app/share/applications/studio.margin.mail.desktop
|
- desktop-file-edit --set-icon=studio.margin.mail /app/share/applications/studio.margin.mail.desktop
|
||||||
|
# Only the plainly named sizes. Tauri also writes a `256x256@2` directory, and hicolor spells
|
||||||
|
# a scaled one `256x256@2x`, so flatpak would be exporting an icon at a size that is not a
|
||||||
|
# size.
|
||||||
- |
|
- |
|
||||||
for src in deb/usr/share/icons/hicolor/*/apps/margin-mail.png; do
|
for size in 32x32 128x128; do
|
||||||
size=$(basename "$(dirname "$(dirname "$src")")")
|
src="deb/usr/share/icons/hicolor/$size/apps/margin-mail.png"
|
||||||
|
[ -f "$src" ] || continue
|
||||||
install -Dm644 "$src" "/app/share/icons/hicolor/$size/apps/studio.margin.mail.png"
|
install -Dm644 "$src" "/app/share/icons/hicolor/$size/apps/studio.margin.mail.png"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
@@ -58,6 +58,18 @@ build:
|
|||||||
*) echo "just: no local build for $(uname -s); macOS and Linux are the desktop targets." >&2; exit 1 ;;
|
*) echo "just: no local build for $(uname -s); macOS and Linux are the desktop targets." >&2; exit 1 ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# Wants flatpak, and pulls the Flathub builder and GNOME runtime if they are not installed.
|
||||||
|
# The release workflow runs the same script over the deb it published.
|
||||||
|
# Build the flatpak, which is the deb repackaged. Linux only.
|
||||||
|
flatpak:
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
[ "$(uname -s)" = Linux ] || { echo "just: the flatpak builds on Linux only." >&2; exit 1; }
|
||||||
|
pnpm install
|
||||||
|
pnpm tauri build --bundles deb
|
||||||
|
cp {{bundle}}/deb/*.deb flatpak/margin-mail.deb
|
||||||
|
flatpak/build.sh
|
||||||
|
|
||||||
# Build, install over whatever version is already installed, and start the new one.
|
# Build, install over whatever version is already installed, and start the new one.
|
||||||
install: build
|
install: build
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|||||||
Reference in new issue
Block a user