mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-10 11:13:48 +02:00
Add Flatpak and Flathub packaging support (#388)
This commit is contained in:
57
flatpak/app.yaak.Yaak.metainfo.xml
Normal file
57
flatpak/app.yaak.Yaak.metainfo.xml
Normal file
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component type="desktop-application">
|
||||
<id>app.yaak.Yaak</id>
|
||||
|
||||
<name>Yaak</name>
|
||||
<summary>An offline, Git friendly API Client</summary>
|
||||
|
||||
<developer id="app.yaak">
|
||||
<name>Yaak</name>
|
||||
</developer>
|
||||
|
||||
<metadata_license>MIT</metadata_license>
|
||||
<project_license>MIT</project_license>
|
||||
|
||||
<url type="homepage">https://yaak.app</url>
|
||||
<url type="bugtracker">https://yaak.app/feedback</url>
|
||||
<url type="contact">https://yaak.app/feedback</url>
|
||||
<url type="vcs-browser">https://github.com/mountain-loop/yaak</url>
|
||||
|
||||
<description>
|
||||
<p>
|
||||
A fast, privacy-first API client for REST, GraphQL, SSE, WebSocket,
|
||||
and gRPC — built with Tauri, Rust, and React.
|
||||
</p>
|
||||
<p>Features include:</p>
|
||||
<ul>
|
||||
<li>REST, GraphQL, SSE, WebSocket, and gRPC support</li>
|
||||
<li>Local-only data, secrets encryption, and zero telemetry</li>
|
||||
<li>Git-friendly plain-text project storage</li>
|
||||
<li>Environment variables and template functions</li>
|
||||
<li>Request chaining and dynamic values</li>
|
||||
<li>OAuth 2.0, Bearer, Basic, API Key, AWS, JWT, and NTLM authentication</li>
|
||||
<li>Import from cURL, Postman, Insomnia, and OpenAPI</li>
|
||||
<li>Extensible plugin system</li>
|
||||
</ul>
|
||||
</description>
|
||||
|
||||
<launchable type="desktop-id">app.yaak.Yaak.desktop</launchable>
|
||||
|
||||
<branding>
|
||||
<color type="primary" scheme_preference="light">#8b32ff</color>
|
||||
<color type="primary" scheme_preference="dark">#c293ff</color>
|
||||
</branding>
|
||||
|
||||
<content_rating type="oars-1.1" />
|
||||
|
||||
<screenshots>
|
||||
<screenshot type="default">
|
||||
<caption>Crafting an API request</caption>
|
||||
<image>https://assets.yaak.app/uploads/screenshot-BLG1w_2310x1326.png</image>
|
||||
</screenshot>
|
||||
</screenshots>
|
||||
|
||||
<releases>
|
||||
<release version="2026.1.2" date="2026-02-10" />
|
||||
</releases>
|
||||
</component>
|
||||
64
flatpak/app.yaak.Yaak.yml
Normal file
64
flatpak/app.yaak.Yaak.yml
Normal file
@@ -0,0 +1,64 @@
|
||||
id: app.yaak.Yaak
|
||||
runtime: org.gnome.Platform
|
||||
runtime-version: "48"
|
||||
sdk: org.gnome.Sdk
|
||||
command: yaak-app
|
||||
rename-desktop-file: yaak.desktop
|
||||
rename-icon: yaak-app
|
||||
|
||||
finish-args:
|
||||
- --socket=wayland
|
||||
- --socket=fallback-x11
|
||||
- --share=ipc
|
||||
- --device=dri
|
||||
- --share=network
|
||||
- --socket=pulseaudio # Preview audio responses
|
||||
- --socket=ssh-auth # Git SSH remotes
|
||||
- --socket=gpg-agent # Git commit signing
|
||||
- --talk-name=org.freedesktop.secrets # Keyring for encryption
|
||||
- --filesystem=home # Git repos, ~/.gitconfig, ~/.ssh, etc
|
||||
|
||||
modules:
|
||||
- name: git
|
||||
cleanup:
|
||||
- /share
|
||||
make-args:
|
||||
- NO_PERL=1
|
||||
- NO_TCLTK=1
|
||||
make-install-args:
|
||||
- INSTALL_SYMLINKS=1
|
||||
- NO_PERL=1
|
||||
- NO_TCLTK=1
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://www.kernel.org/pub/software/scm/git/git-2.48.1.tar.gz
|
||||
sha256: 51b4d03b1e311ba673591210f94f24a4c5781453e1eb188822e3d9cdc04c2212
|
||||
|
||||
- name: yaak
|
||||
buildsystem: simple
|
||||
build-commands:
|
||||
- ar -x yaak.deb
|
||||
- tar -xf data.tar.gz
|
||||
- mv usr/bin/* /app/bin
|
||||
- mv usr/lib/* /app/lib
|
||||
- mv usr/share/* /app/share
|
||||
- install -Dm644 app.yaak.Yaak.metainfo.xml /app/share/metainfo/app.yaak.Yaak.metainfo.xml
|
||||
- install -Dm644 LICENSE /app/share/licenses/app.yaak.Yaak/LICENSE
|
||||
|
||||
sources:
|
||||
- type: file
|
||||
dest-filename: yaak.deb
|
||||
url: https://github.com/mountain-loop/yaak/releases/download/v2026.1.2/yaak_2026.1.2_amd64.deb
|
||||
sha256: "c4236b5bcf391e579dc79b71c3b5c58f6f9bfc6c175fc70426d0ca85799beba5"
|
||||
only-arches:
|
||||
- x86_64
|
||||
- type: file
|
||||
dest-filename: yaak.deb
|
||||
url: https://github.com/mountain-loop/yaak/releases/download/v2026.1.2/yaak_2026.1.2_arm64.deb
|
||||
sha256: "9ba9b7c9df56ffb9b801e40cb38685f1650cf7e2f9e85dad0ae3329f8e01ff6d"
|
||||
only-arches:
|
||||
- aarch64
|
||||
- type: file
|
||||
path: app.yaak.Yaak.metainfo.xml
|
||||
- type: file
|
||||
path: ../LICENSE
|
||||
82
flatpak/update-manifest.sh
Executable file
82
flatpak/update-manifest.sh
Executable file
@@ -0,0 +1,82 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Update the Flatpak manifest with URLs and SHA256 hashes for a given release.
|
||||
#
|
||||
# Usage:
|
||||
# ./flatpak/update-manifest.sh v2026.2.0
|
||||
#
|
||||
# This script:
|
||||
# 1. Downloads the x86_64 and aarch64 .deb files from the GitHub release
|
||||
# 2. Computes their SHA256 checksums
|
||||
# 3. Updates the manifest YAML with the correct URLs and hashes
|
||||
# 4. Updates the metainfo.xml with a new <release> entry
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
MANIFEST="$SCRIPT_DIR/app.yaak.Yaak.yml"
|
||||
METAINFO="$SCRIPT_DIR/app.yaak.Yaak.metainfo.xml"
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
echo "Usage: $0 <version-tag>"
|
||||
echo "Example: $0 v2026.2.0"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
VERSION_TAG="$1"
|
||||
VERSION="${VERSION_TAG#v}"
|
||||
|
||||
# Only allow stable releases (skip beta, alpha, rc, etc.)
|
||||
if [[ "$VERSION" == *-* ]]; then
|
||||
echo "Skipping pre-release version '$VERSION_TAG' (only stable releases are published to Flathub)"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
REPO="mountain-loop/yaak"
|
||||
BASE_URL="https://github.com/$REPO/releases/download/$VERSION_TAG"
|
||||
|
||||
DEB_AMD64="yaak_${VERSION}_amd64.deb"
|
||||
DEB_ARM64="yaak_${VERSION}_arm64.deb"
|
||||
|
||||
TMPDIR=$(mktemp -d)
|
||||
trap 'rm -rf "$TMPDIR"' EXIT
|
||||
|
||||
echo "Downloading $DEB_AMD64..."
|
||||
curl -fSL "$BASE_URL/$DEB_AMD64" -o "$TMPDIR/$DEB_AMD64"
|
||||
SHA_AMD64=$(sha256sum "$TMPDIR/$DEB_AMD64" | cut -d' ' -f1)
|
||||
echo " SHA256: $SHA_AMD64"
|
||||
|
||||
echo "Downloading $DEB_ARM64..."
|
||||
curl -fSL "$BASE_URL/$DEB_ARM64" -o "$TMPDIR/$DEB_ARM64"
|
||||
SHA_ARM64=$(sha256sum "$TMPDIR/$DEB_ARM64" | cut -d' ' -f1)
|
||||
echo " SHA256: $SHA_ARM64"
|
||||
|
||||
echo ""
|
||||
echo "Updating manifest: $MANIFEST"
|
||||
|
||||
# Update URLs by matching the arch-specific deb filename
|
||||
sed -i "s|url: .*amd64\.deb|url: $BASE_URL/$DEB_AMD64|" "$MANIFEST"
|
||||
sed -i "s|url: .*arm64\.deb|url: $BASE_URL/$DEB_ARM64|" "$MANIFEST"
|
||||
|
||||
# Update SHA256 hashes by finding the current ones and replacing
|
||||
OLD_SHA_AMD64=$(grep -A2 "amd64\.deb" "$MANIFEST" | grep sha256 | sed 's/.*"\(.*\)"/\1/')
|
||||
OLD_SHA_ARM64=$(grep -A2 "arm64\.deb" "$MANIFEST" | grep sha256 | sed 's/.*"\(.*\)"/\1/')
|
||||
|
||||
sed -i "s|$OLD_SHA_AMD64|$SHA_AMD64|" "$MANIFEST"
|
||||
sed -i "s|$OLD_SHA_ARM64|$SHA_ARM64|" "$MANIFEST"
|
||||
|
||||
echo " Manifest updated."
|
||||
|
||||
echo "Updating metainfo: $METAINFO"
|
||||
|
||||
TODAY=$(date +%Y-%m-%d)
|
||||
|
||||
# Insert new release entry after <releases>
|
||||
sed -i "s| <releases>| <releases>\n <release version=\"$VERSION\" date=\"$TODAY\" />|" "$METAINFO"
|
||||
|
||||
echo " Metainfo updated."
|
||||
|
||||
echo ""
|
||||
echo "Done! Review the changes:"
|
||||
echo " $MANIFEST"
|
||||
echo " $METAINFO"
|
||||
Reference in New Issue
Block a user