From 74b8c2f5ddafbe08d766ba2efb4ca8dc9223b54c Mon Sep 17 00:00:00 2001 From: John Goh Date: Fri, 21 Aug 2026 00:13:58 +0800 Subject: [PATCH 1/2] fix: keep AppImage smoke script parseable --- .github/workflows/ci.yml | 3 +++ scripts/smoke-appimage.sh | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 10165373..9cb90783 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,6 +45,9 @@ jobs: - name: Static checks (go vet + svelte-check) run: make check + - name: Shell script syntax + run: bash -n scripts/*.sh + - name: Go tests run: make test diff --git a/scripts/smoke-appimage.sh b/scripts/smoke-appimage.sh index 78af0408..9bb6974b 100755 --- a/scripts/smoke-appimage.sh +++ b/scripts/smoke-appimage.sh @@ -85,7 +85,7 @@ docker run --rm -v "$(realpath "$APPIMAGE")":/chartr.AppImage:ro "$IMAGE" bash - fail "WebKit reported an internal error" fi - # The X11 identity is the runtime half of desktop integration. GTK's resource + # The X11 identity is the runtime half of desktop integration. The GTK resource # name is lowercase and its resource class is conventionally title-cased; # StartupWMClass uses the latter so a real desktop resolves the bundled icon. # Bare Xvfb has no window manager, so _NET_WM_ICON is diagnostic only here. From 005044c721967e22638b3da9a41da21392c6fa3e Mon Sep 17 00:00:00 2001 From: John Goh Date: Fri, 21 Aug 2026 00:20:44 +0800 Subject: [PATCH 2/2] fix: unblock the two release steps RC1-3 never reached The AppImage smoke gate has failed on every v0.2.4 RC, so the deb/rpm smoke and the asset attach behind it have not run since v0.2.3. Both carry a regression. The native-package smoke still asserts a 512x512 PNG icon. nfpm stopped shipping one in 1e45e70, which lands the icon bands as SVG masters instead, so the deb smoke would have failed the moment it ran. The attach job reads the desktop artifacts as a flat directory, but upload-artifact roots the artifact at the common ancestor of its path globs and the download arrives split across appimage/ and packages/. Every lookup missed, every architecture was skipped without complaint, and the upload then choked on a directory in its glob -- which is why v0.2.3 carries no AppImage, deb or rpm asset at all and the README's /releases/latest/download links point at nothing. Flatten the download first, and fail loudly rather than silently skipping an architecture. --- .github/workflows/release.yml | 14 +++++++++++++- scripts/smoke-native-package.sh | 5 ++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 024b9d5d..6d5c0ea8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -230,10 +230,22 @@ jobs: shell: bash run: | set -e + # upload-artifact roots the artifact at the common ancestor of its + # path globs, so the download arrives split across appimage/ and + # packages/ rather than flat. v0.2.3 shipped with no Linux assets at + # all because of that: every `ls` below missed, every arch was + # skipped without complaint, and the upload then choked on a + # directory in its glob. Flatten first, and fail loudly on a miss. + find linux-desktop -mindepth 2 -type f -exec mv -t linux-desktop {} + + find linux-desktop -mindepth 1 -type d -empty -delete for arch in amd64 arm64; do for extension in AppImage deb rpm; do versioned=$(ls linux-desktop/chartr_*_linux_${arch}.${extension} 2>/dev/null | head -1) || true - [ -n "$versioned" ] || continue + if [ -z "$versioned" ]; then + echo "no chartr_*_linux_${arch}.${extension} among the built artifacts:" >&2 + ls -R linux-desktop >&2 + exit 1 + fi alias="linux-desktop/chartr_linux_${arch}.${extension}" cp "$versioned" "$alias" ( cd linux-desktop && sha256sum "chartr_linux_${arch}.${extension}" > "chartr_linux_${arch}.${extension}.sha256" ) diff --git a/scripts/smoke-native-package.sh b/scripts/smoke-native-package.sh index e8fbe7cb..6debe7e9 100755 --- a/scripts/smoke-native-package.sh +++ b/scripts/smoke-native-package.sh @@ -67,7 +67,10 @@ docker run --rm \ test -x /usr/bin/chartr test -f /usr/share/applications/io.github.rengwu.chartr.desktop test -f /usr/share/metainfo/io.github.rengwu.chartr.metainfo.xml - test -f /usr/share/icons/hicolor/512x512/apps/chartr.png + # The icon bands ship as SVG masters (ADR 0016), not a single 512 PNG. + test -f /usr/share/icons/hicolor/16x16/apps/chartr.svg + test -f /usr/share/icons/hicolor/32x32/apps/chartr.svg + test -f /usr/share/icons/hicolor/scalable/apps/chartr.svg chartr --version | grep -F "chartr shell ${EXPECTED_VERSION} " export XDG_RUNTIME_DIR=/tmp/xdg