diff --git a/HSRename.AppImage b/HSRename.AppImage deleted file mode 100755 index dd9f575..0000000 Binary files a/HSRename.AppImage and /dev/null differ diff --git a/VERSION b/VERSION index ee90284..90a27f9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.4 +1.0.5 diff --git a/build_appimage.sh b/build_appimage.sh index c710fa6..22001fb 100755 --- a/build_appimage.sh +++ b/build_appimage.sh @@ -14,7 +14,8 @@ VERSION="$(tr -d '[:space:]' < VERSION 2>/dev/null || echo "")" echo "=== Installing build deps ===" 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 \ -n "$EXE_NAME" \ --hidden-import=engine \ @@ -36,13 +37,6 @@ echo "$VERSION" > "$APPDIR/usr/share/hsrename/VERSION" if [[ -f "packaging/release-stamp-${VERSION}.txt" ]]; then cp "packaging/release-stamp-${VERSION}.txt" "$APPDIR/usr/share/hsrename/release-stamp.txt" 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 #!/bin/sh @@ -70,7 +64,6 @@ else fi 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 OUT="${APP_NAME}.AppImage" appimagetool "$APPDIR" "$OUT" @@ -79,5 +72,10 @@ else echo "AppDir is ready at $APPDIR/" echo "To create the .AppImage, install appimagetool and run:" echo " appimagetool $APPDIR ${APP_NAME}.AppImage" - echo " # Get it from: https://github.com/AppImage/appimagetool/releases" + exit 1 +fi + +if ! strings "$OUT" | grep -q "engine.tvdb_client"; then + echo "ERROR: Built AppImage is missing TheTVDB modules." >&2 + exit 1 fi diff --git a/packaging/release-stamp-1.0.5.txt b/packaging/release-stamp-1.0.5.txt new file mode 100644 index 0000000..d1bf603 --- /dev/null +++ b/packaging/release-stamp-1.0.5.txt @@ -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 diff --git a/release_gitea.sh b/release_gitea.sh index 0a1db6e..3ae92bf 100755 --- a/release_gitea.sh +++ b/release_gitea.sh @@ -2,9 +2,10 @@ # Push tag to Gitea and publish HSRename.AppImage as a release asset. # Usage: # 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 cd "$(dirname "$0")" @@ -22,18 +23,34 @@ APP_IMAGE="HSRename.AppImage" VERSION="$(tr -d '[:space:]' < VERSION)" TAG="v${VERSION}" -if [[ "${1:-}" == "--build" ]]; then - export PATH="/tmp:${PATH}" - if ! command -v appimagetool &>/dev/null && [[ -x /tmp/appimagetool ]]; then - export PATH="/tmp:${PATH}" +verify_appimage() { + if [[ ! -f "$APP_IMAGE" ]]; then + echo "Missing $APP_IMAGE after build." >&2 + exit 1 fi - ./build_appimage.sh + if ! strings "$APP_IMAGE" | grep -q "engine.tvdb_client"; then + echo "ERROR: $APP_IMAGE is missing TheTVDB modules; refusing to publish." >&2 + exit 1 + fi + if ! strings "$APP_IMAGE" | grep -q "engine.episode_match"; then + echo "ERROR: $APP_IMAGE is missing episode matching; refusing to publish." >&2 + exit 1 + fi +} + +export PATH="/tmp:${PATH}" +if ! command -v appimagetool &>/dev/null && [[ -x /tmp/appimagetool ]]; then + export PATH="/tmp:${PATH}" +fi +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 -if [[ ! -f "$APP_IMAGE" ]]; then - echo "Missing $APP_IMAGE. Run ./build_appimage.sh or ./release_gitea.sh --build" - exit 1 -fi +echo "=== Building fresh AppImage for ${TAG} ===" +./build_appimage.sh +verify_appimage if ! git rev-parse "$TAG" >/dev/null 2>&1; then echo "Tag $TAG not found. Create it with: git tag $TAG" @@ -46,10 +63,8 @@ git push origin "$TAG" if [[ -z "${GITEA_TOKEN:-}" ]]; then 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 "" - echo "Or create the release manually on Gitea and attach $APP_IMAGE." exit 0 fi @@ -57,9 +72,10 @@ API="${GITEA_HOST}/api/v1/repos/${GITEA_OWNER}/${GITEA_REPO}/releases" NOTES="$(cat <