mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-12 08:51:04 +00:00
ArtCraft’s Help menu has news but no application update check, and its Flatpak cannot invoke the host updater. Add **Help → Check for Updates…** with background checks, current/available versions, explicit Update and restart, progress and failure states, and Releases fallback. Browser users are offered a reload and the desktop releases. Use the same verified `craft-update` core as the native Craft apps, pinned to the immutable reviewed commit in https://github.com/storytold/craft-libs/pull/970. Keep ArtCraft’s existing `ai.artcraft.app` identity and release naming. Honor launcher pins, reject active generation tasks before download and again before replacement, preserve the native window during installation, defer the helper until accepted exit, and report helper outcomes on startup. Registered NSIS copies use Releases; they are not overwritten as portable folders. Grant the host update interface and read-only launcher choices in the existing Flatpak manifest. No frontend network-policy expansion. Add a separate version commit changing the canonical Tauri configuration and display version to **0.42.1**, with a regression keeping them synchronized. Once this and the shared-library prerequisite are green and merged, merge main into the release branch, finish all platform drafts, verify signed checksums/assets, and publish. Validation: native all-target cargo check inside GNOME SDK 51; all six focused Rust updater tests; all ten Help-menu/UI tests; TypeScript project build; production frontend build; Flatpak permission regression red before and green after. All six native SDK tests also pass at the final 0.42.1 version. The existing lockfile needs compatible chrono and crc32fast updates for the shared updater; other dependency revisions are preserved.
52 lines
2.1 KiB
Bash
Executable File
52 lines
2.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Integration fixture: real DEB/RPM archives, with no Rust compilation or signing key.
|
|
set -euo pipefail
|
|
bash "$(dirname "$0")/flatpak-update-test.sh"
|
|
script="$(realpath "$(dirname "$0")/package.sh")"
|
|
work="$(mktemp -d)"
|
|
trap 'rm -rf "$work"' EXIT
|
|
cd "$work"
|
|
mkdir -p crates/desktop/artcraft target/x86_64-unknown-linux-gnu/release/bundle/{deb,rpm,appimage}
|
|
printf '{"version":"0.42.0"}\n' > crates/desktop/artcraft/tauri.conf.json
|
|
mkdir -p stage/{DEBIAN,usr/bin,usr/share/applications}
|
|
cp /bin/true stage/usr/bin/artcraft
|
|
printf '[Desktop Entry]\nType=Application\nName=ArtCraft\nExec=artcraft\n' > stage/usr/share/applications/ArtCraft.desktop
|
|
cat > stage/DEBIAN/control <<'CONTROL'
|
|
Package: artcraft
|
|
Version: 0.42.0
|
|
Architecture: amd64
|
|
Maintainer: Fixture <fixture@example.invalid>
|
|
Description: Packaging fixture
|
|
CONTROL
|
|
dpkg-deb --build stage target/x86_64-unknown-linux-gnu/release/bundle/deb/ArtCraft.deb
|
|
mkdir -p rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
|
|
cat > rpmbuild/SPECS/artcraft.spec <<'SPEC'
|
|
Name: artcraft
|
|
Version: 0.42.0
|
|
Release: 1
|
|
Summary: Packaging fixture
|
|
License: MIT
|
|
%description
|
|
Packaging fixture
|
|
%install
|
|
mkdir -p %{buildroot}/usr/bin
|
|
cp /bin/true %{buildroot}/usr/bin/artcraft
|
|
%files
|
|
/usr/bin/artcraft
|
|
SPEC
|
|
rpmbuild --define "_topdir $work/rpmbuild" -bb rpmbuild/SPECS/artcraft.spec
|
|
find rpmbuild/RPMS -name '*.rpm' -exec cp {} target/x86_64-unknown-linux-gnu/release/bundle/rpm/ \;
|
|
printf 'appimage fixture\n' > target/x86_64-unknown-linux-gnu/release/bundle/appimage/ArtCraft.AppImage
|
|
"$script" x86_64 x86_64-unknown-linux-gnu
|
|
for format in deb rpm AppImage AppImage.zsync tar.gz; do [[ -s "dist/release/artcraft-0.42.0-linux-x86_64.$format" ]]; done
|
|
mkdir unpacked
|
|
tar -xzf dist/release/artcraft-0.42.0-linux-x86_64.tar.gz -C unpacked
|
|
[[ -x unpacked/artcraft-0.42.0-linux-x86_64/bin/artcraft ]]
|
|
[[ -f unpacked/artcraft-0.42.0-linux-x86_64/share/applications/ai.artcraft.app.desktop ]]
|
|
rm target/x86_64-unknown-linux-gnu/release/bundle/rpm/*.rpm
|
|
if "$script" x86_64 x86_64-unknown-linux-gnu; then
|
|
echo 'Packaging accepted a missing RPM' >&2
|
|
exit 1
|
|
fi
|
|
echo 'Package integration checks passed'
|