2 Commits
Author SHA1 Message Date
Bulk RenamerandCursor c54ee7876c Fix AppImage verify step to inspect the PyInstaller binary.
The squashfs wrapper does not contain module path strings reliably.

Co-authored-by: Cursor <[email protected]>
2026-07-03 17:23:45 -05:00
Bulk RenamerandCursor 9ba2c68ff9 Release v1.0.5: fix botched AppImage publish pipeline.
Stop tracking HSRename.AppImage in git, always rebuild before release, and verify TheTVDB modules are bundled.

Co-authored-by: Cursor <[email protected]>
2026-07-03 17:23:18 -05:00
5 changed files with 48 additions and 27 deletions
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -1 +1 @@
1.0.4 1.0.5
+8 -10
View File
@@ -14,7 +14,8 @@ VERSION="$(tr -d '[:space:]' < VERSION 2>/dev/null || echo "")"
echo "=== Installing build deps ===" echo "=== Installing build deps ==="
pip install -q -r requirements.txt -r requirements-build.txt pip install -q -r requirements.txt -r requirements-build.txt
echo "=== Running PyInstaller ===" echo "=== Running PyInstaller (clean) ==="
rm -rf build dist HSRename.spec
pyinstaller --noconfirm --onedir --windowed \ pyinstaller --noconfirm --onedir --windowed \
-n "$EXE_NAME" \ -n "$EXE_NAME" \
--hidden-import=engine \ --hidden-import=engine \
@@ -36,13 +37,6 @@ echo "$VERSION" > "$APPDIR/usr/share/hsrename/VERSION"
if [[ -f "packaging/release-stamp-${VERSION}.txt" ]]; then if [[ -f "packaging/release-stamp-${VERSION}.txt" ]]; then
cp "packaging/release-stamp-${VERSION}.txt" "$APPDIR/usr/share/hsrename/release-stamp.txt" cp "packaging/release-stamp-${VERSION}.txt" "$APPDIR/usr/share/hsrename/release-stamp.txt"
fi fi
# Gear Lever compares file sizes; incompressible pad for patch releases (zeros squash to nothing).
dd if=/dev/urandom of="$APPDIR/usr/share/hsrename/.buildpad" bs=1024 count=300 status=none
cat > "$APPDIR/usr/share/hsrename/changelog.txt" << EOF
HSRename ${VERSION}
- Fix TheTVDB search dropping results (parse series-76320 style IDs)
- Gear Lever Forgejo update docs
EOF
cat > "$APPDIR/AppRun" << EOF cat > "$APPDIR/AppRun" << EOF
#!/bin/sh #!/bin/sh
@@ -70,7 +64,6 @@ else
fi fi
echo "=== Building AppImage (requires appimagetool) ===" echo "=== Building AppImage (requires appimagetool) ==="
# Note: appimagetool does not accept plain https URLs for -u; use zsync/gh-releases-zsync per AppImage docs.
if command -v appimagetool &>/dev/null; then if command -v appimagetool &>/dev/null; then
OUT="${APP_NAME}.AppImage" OUT="${APP_NAME}.AppImage"
appimagetool "$APPDIR" "$OUT" appimagetool "$APPDIR" "$OUT"
@@ -79,5 +72,10 @@ else
echo "AppDir is ready at $APPDIR/" echo "AppDir is ready at $APPDIR/"
echo "To create the .AppImage, install appimagetool and run:" echo "To create the .AppImage, install appimagetool and run:"
echo " appimagetool $APPDIR ${APP_NAME}.AppImage" echo " appimagetool $APPDIR ${APP_NAME}.AppImage"
echo " # Get it from: https://github.com/AppImage/appimagetool/releases" exit 1
fi
if ! strings "dist/$EXE_NAME/$EXE_NAME" | grep -q "engine.tvdb_client"; then
echo "ERROR: Built executable is missing TheTVDB modules." >&2
exit 1
fi fi
+3
View File
@@ -0,0 +1,3 @@
HSRename 1.0.5
- Restore TheTVDB episode match feature in published AppImage (v1.0.4 asset was an outdated binary)
- TheTVDB search fix for series-76320 style IDs
+33 -13
View File
@@ -2,9 +2,10 @@
# Push tag to Gitea and publish HSRename.AppImage as a release asset. # Push tag to Gitea and publish HSRename.AppImage as a release asset.
# Usage: # Usage:
# GITEA_TOKEN=your_token ./release_gitea.sh # GITEA_TOKEN=your_token ./release_gitea.sh
# Optional: ./release_gitea.sh --build (rebuild AppImage first)
# #
# Requires: curl, git, and network access to your Gitea instance. # Always rebuilds the AppImage before upload so releases never ship a stale binary.
#
# Requires: curl, git, appimagetool, and network access to your Gitea instance.
set -euo pipefail set -euo pipefail
cd "$(dirname "$0")" cd "$(dirname "$0")"
@@ -22,18 +23,38 @@ APP_IMAGE="HSRename.AppImage"
VERSION="$(tr -d '[:space:]' < VERSION)" VERSION="$(tr -d '[:space:]' < VERSION)"
TAG="v${VERSION}" TAG="v${VERSION}"
if [[ "${1:-}" == "--build" ]]; then verify_appimage() {
if [[ ! -f "$APP_IMAGE" ]]; then
echo "Missing $APP_IMAGE after build." >&2
exit 1
fi
if [[ ! -f "dist/HSRename/HSRename" ]]; then
echo "Missing dist/HSRename/HSRename after build." >&2
exit 1
fi
if ! strings "dist/HSRename/HSRename" | grep -q "engine.tvdb_client"; then
echo "ERROR: Built executable is missing TheTVDB modules; refusing to publish." >&2
exit 1
fi
if ! strings "dist/HSRename/HSRename" | grep -q "engine.episode_match"; then
echo "ERROR: Built executable is missing episode matching; refusing to publish." >&2
exit 1
fi
}
export PATH="/tmp:${PATH}" export PATH="/tmp:${PATH}"
if ! command -v appimagetool &>/dev/null && [[ -x /tmp/appimagetool ]]; then if ! command -v appimagetool &>/dev/null && [[ -x /tmp/appimagetool ]]; then
export PATH="/tmp:${PATH}" export PATH="/tmp:${PATH}"
fi fi
./build_appimage.sh if ! command -v appimagetool &>/dev/null; then
curl -fsSL -o /tmp/appimagetool "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage"
chmod +x /tmp/appimagetool
export PATH="/tmp:${PATH}"
fi fi
if [[ ! -f "$APP_IMAGE" ]]; then echo "=== Building fresh AppImage for ${TAG} ==="
echo "Missing $APP_IMAGE. Run ./build_appimage.sh or ./release_gitea.sh --build" ./build_appimage.sh
exit 1 verify_appimage
fi
if ! git rev-parse "$TAG" >/dev/null 2>&1; then if ! git rev-parse "$TAG" >/dev/null 2>&1; then
echo "Tag $TAG not found. Create it with: git tag $TAG" echo "Tag $TAG not found. Create it with: git tag $TAG"
@@ -46,10 +67,8 @@ git push origin "$TAG"
if [[ -z "${GITEA_TOKEN:-}" ]]; then if [[ -z "${GITEA_TOKEN:-}" ]]; then
echo "" echo ""
echo "Code and tag pushed. To upload the AppImage, set GITEA_TOKEN and re-run:" echo "Built and verified $APP_IMAGE. Set GITEA_TOKEN and re-run to upload:"
echo " GITEA_TOKEN=... ./release_gitea.sh" echo " GITEA_TOKEN=... ./release_gitea.sh"
echo ""
echo "Or create the release manually on Gitea and attach $APP_IMAGE."
exit 0 exit 0
fi fi
@@ -57,9 +76,10 @@ API="${GITEA_HOST}/api/v1/repos/${GITEA_OWNER}/${GITEA_REPO}/releases"
NOTES="$(cat <<EOF NOTES="$(cat <<EOF
## HSRename ${TAG} ## HSRename ${TAG}
See repository history for changes in this release. - Fix botched v1.0.4 AppImage (restores TheTVDB episode match + search fix)
- Always verify/update via Gear Lever Forgejo: \`https://git.hisora.dev/Dawnsorrow/HS-Rename\`
Gear Lever update URL: Download:
\`${GITEA_HOST}/${GITEA_OWNER}/${GITEA_REPO}/releases/download/${TAG}/${APP_IMAGE}\` \`${GITEA_HOST}/${GITEA_OWNER}/${GITEA_REPO}/releases/download/${TAG}/${APP_IMAGE}\`
EOF EOF
)" )"