From 8123053a402e3e2f09e80b1bbfbb736d7283fa1d Mon Sep 17 00:00:00 2001 From: Youwes09 Date: Mon, 27 Apr 2026 23:45:44 -0500 Subject: [PATCH] Chore: Update to Version 0.9.1 (V3) --- PKGBUILD | 2 +- flake.nix | 63 ++++++++------------------------- io.github.moku_project.Moku.yml | 2 +- 3 files changed, 16 insertions(+), 51 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index 6f6993d..d130b6e 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -22,7 +22,7 @@ source=( "Suwayomi-Server-v2.1.1867.jar::https://github.com/Suwayomi/Suwayomi-Server/releases/download/v2.1.1867/Suwayomi-Server-v2.1.1867.jar" ) sha256sums=( - 'SKIP' + '4d0fbed929d5660ddcb591ff33f808910e13df1e8e7bfc8df83f367fd7bcd881' '51e307c2581e4e1a002991ab3e3a77503c8b074c42695987a984a7382d0ac5af' ) diff --git a/flake.nix b/flake.nix index 47c32df..832ed58 100644 --- a/flake.nix +++ b/flake.nix @@ -149,9 +149,11 @@ EOF bumpScript = pkgs.writeShellApplication { name = "moku-bump"; - runtimeInputs = with pkgs; [ gnused coreutils git rustToolchain - nodejs_22 pnpm - (python3.withPackages (ps: [ ps.aiohttp ps.tomlkit ])) ]; + runtimeInputs = with pkgs; [ + gnused coreutils git rustToolchain + nodejs_22 pnpm + (python3.withPackages (ps: [ ps.aiohttp ps.tomlkit ])) + ]; text = '' [[ $# -lt 1 ]] && { echo "Usage: nix run .#bump -- "; exit 1; } VERSION="$1" @@ -189,7 +191,7 @@ EOF -o "$REPO/packaging/cargo-sources.json" echo "Done" - echo "── Patching flatpak manifest (version + frontend sha256) ──" + echo "── Patching flatpak manifest ──" MANIFEST="$REPO/io.github.moku_project.Moku.yml" sed -i "s/tag: v[^[:space:]]*/tag: v$VERSION/" "$MANIFEST" python3 - "$MANIFEST" "$FRONTEND_SHA" <<'PYEOF' @@ -206,11 +208,7 @@ EOF echo "Done" echo "" - echo "Bumped to v$VERSION" - echo "" - echo "Commit field in the flatpak manifest still points to the old tag." - echo "After pushing the tag, run:" - echo " nix run .#post-tag-bump -- $VERSION" + echo "Bumped to v$VERSION — commit, tag, push, then: nix run .#post-tag-bump -- $VERSION" ''; }; @@ -235,7 +233,7 @@ EOF echo "── Fetching PKGBUILD tarball sha256 ──" TARBALL_URL="https://github.com/moku-project/Moku/archive/refs/tags/v$VERSION.tar.gz" TARBALL_SHA=$(curl -fsSL "$TARBALL_URL" | sha256sum | awk '{print $1}') - sed -i "s/\(sha256sums=('\)[0-9a-f]\{64\}/\1$TARBALL_SHA/" "$PKGBUILD" + sed -i "/sha256sums=/,/)/{ 0,/'/s/'[^']*'/'$TARBALL_SHA'/ }" "$PKGBUILD" grep -q "$TARBALL_SHA" "$PKGBUILD" \ || { echo "ERROR: PKGBUILD sha256 replacement failed"; exit 1; } echo "Done" @@ -247,17 +245,12 @@ EOF flatpakScript = pkgs.writeShellApplication { name = "moku-flatpak"; - runtimeInputs = with pkgs; [ - gnused coreutils git - appstream flatpak-builder flatpak - ]; + runtimeInputs = with pkgs; [ coreutils git appstream flatpak-builder flatpak ]; text = '' [[ $# -lt 1 ]] && { echo "Usage: nix run .#flatpak -- "; exit 1; } - VERSION="$1" REPO="$(git rev-parse --show-toplevel)" MANIFEST="$REPO/io.github.moku_project.Moku.yml" - echo "── Building flatpak for v$VERSION ──" rm -rf "$REPO/build-dir" "$REPO/repo" flatpak-builder \ --repo="$REPO/repo" \ @@ -267,33 +260,7 @@ EOF flatpak build-bundle "$REPO/repo" "$REPO/moku.flatpak" io.github.moku_project.Moku rm -rf "$REPO/build-dir" "$REPO/repo" - echo "" - echo "moku.flatpak created — v$VERSION" - ''; - }; - - pkgbuildBumpScript = pkgs.writeShellApplication { - name = "moku-pkgbuild-bump"; - runtimeInputs = with pkgs; [ gnused curl coreutils git ]; - text = '' - [[ $# -lt 1 ]] && { echo "Usage: nix run .#pkgbuild-bump -- "; exit 1; } - VERSION="$1" - REPO="$(git rev-parse --show-toplevel)" - PKGBUILD="$REPO/PKGBUILD" - [[ -f "$PKGBUILD" ]] || { echo "PKGBUILD not found"; exit 1; } - - TARBALL_URL="https://github.com/moku-project/Moku/archive/refs/tags/v$VERSION.tar.gz" - echo "Fetching tarball sha256..." - TARBALL_SHA=$(curl -fsSL "$TARBALL_URL" | sha256sum | awk '{print $1}') - - sed -i "s/^pkgver=.*/pkgver=$VERSION/" "$PKGBUILD" - sed -i "s/^pkgrel=.*/pkgrel=1/" "$PKGBUILD" - sed -i "s/\(sha256sums=('\)[0-9a-f]\{64\}/\1$TARBALL_SHA/" "$PKGBUILD" - - grep -q "$TARBALL_SHA" "$PKGBUILD" \ - || { echo "ERROR: sha256 replacement failed"; exit 1; } - - echo "PKGBUILD -> $VERSION ($TARBALL_SHA)" + echo "moku.flatpak created" ''; }; @@ -314,7 +281,6 @@ EOF bump = { type = "app"; program = "${bumpScript}/bin/moku-bump"; }; post-tag-bump = { type = "app"; program = "${postTagBumpScript}/bin/moku-post-tag-bump"; }; flatpak = { type = "app"; program = "${flatpakScript}/bin/moku-flatpak"; }; - pkgbuild-bump = { type = "app"; program = "${pkgbuildBumpScript}/bin/moku-pkgbuild-bump"; }; tunnel = { type = "app"; program = "${tunnelScript}/bin/moku-tunnel"; }; }; @@ -343,12 +309,11 @@ EOF echo "Moku dev shell — pnpm install && pnpm tauri:dev" echo "" - echo "Release workflow:" - echo " nix run .#bump -- bump all versions + rebuild artifacts" + echo " nix run .#bump -- " echo " git commit && git tag && git push" - echo " nix run .#post-tag-bump -- patch manifest commit + PKGBUILD sha" - echo " nix run .#flatpak -- build moku.flatpak" - echo " nix run .#tunnel -- [port] cloudflare tunnel (default 4567)" + echo " nix run .#post-tag-bump -- " + echo " nix run .#flatpak -- " + echo " nix run .#tunnel -- [port]" ''; }; diff --git a/io.github.moku_project.Moku.yml b/io.github.moku_project.Moku.yml index 4e35e7c..cc736fc 100644 --- a/io.github.moku_project.Moku.yml +++ b/io.github.moku_project.Moku.yml @@ -180,7 +180,7 @@ modules: - type: git url: https://github.com/moku-project/Moku.git tag: v0.9.1 - commit: 514910667b0d6e375569a48fb7cef11411d30fbd + commit: e33464b05baddc7c4ad3815f3f126f791e8c58cc - type: file path: packaging/frontend-dist.tar.gz sha256: ce773b63c625448df8e128508b46e7e84d2e5cdb1f2b65a6a03f52a4e350b0bf