Fix PR review comments: version check, runtime deps, CI test deps, release guard

- install.sh: Replace awk float comparison with integer major/minor check
  so Python 3.9 is correctly rejected as < 3.13
- nfpm.yaml: Add git/curl/wget as recommends so users have basic archiving
  tools out of the box without needing `archivebox install`
- debian.yml: Restore git/curl/wget in CI smoke test to match what the
  package recommends, instead of relying on runner preinstalls
- debian.yml: Guard release upload to skip gracefully when no GitHub
  Release exists (fixes workflow_dispatch failures)

https://claude.ai/code/session_01Vx1EsNrNySgsc8Y67dGzCn
This commit is contained in:
Claude
2026-03-15 04:28:46 +00:00
parent 3501b393eb
commit 7300892b08
3 changed files with 19 additions and 5 deletions

View File

@@ -108,7 +108,7 @@ jobs:
- name: Install system dependencies - name: Install system dependencies
run: | run: |
sudo apt-get install -y python3.13 python3.13-venv python3-pip sudo apt-get install -y python3.13 python3.13-venv python3-pip git curl wget
- name: Pre-seed virtualenv with local wheel before dpkg install - name: Pre-seed virtualenv with local wheel before dpkg install
run: | run: |
@@ -178,8 +178,6 @@ jobs:
- name: Determine release tag - name: Determine release tag
id: tag id: tag
run: | run: |
# github.event.release.tag_name is set for release events but empty
# for workflow_dispatch. Fall back to the version from pyproject.toml.
TAG="${{ github.event.release.tag_name }}" TAG="${{ github.event.release.tag_name }}"
if [ -z "$TAG" ]; then if [ -z "$TAG" ]; then
TAG="v$(grep '^version = ' pyproject.toml | awk -F'\"' '{print $2}')" TAG="v$(grep '^version = ' pyproject.toml | awk -F'\"' '{print $2}')"
@@ -197,4 +195,10 @@ jobs:
env: env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: | run: |
# Verify the release exists before uploading (workflow_dispatch may not have one)
if ! gh release view "${{ steps.tag.outputs.tag }}" >/dev/null 2>&1; then
echo "[!] No GitHub Release found for tag ${{ steps.tag.outputs.tag }}, skipping upload."
echo " Create a release first or trigger via the release event."
exit 0
fi
gh release upload "${{ steps.tag.outputs.tag }}" *.deb --clobber gh release upload "${{ steps.tag.outputs.tag }}" *.deb --clobber

View File

@@ -13,8 +13,10 @@ if command -v python3.13 >/dev/null 2>&1; then
PYTHON="python3.13" PYTHON="python3.13"
elif command -v python3 >/dev/null 2>&1; then elif command -v python3 >/dev/null 2>&1; then
PYTHON="python3" PYTHON="python3"
PY_VER="$("$PYTHON" -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")')" PY_MAJOR="$("$PYTHON" -c 'import sys; print(sys.version_info.major)')"
if [ "$(echo "$PY_VER 3.13" | awk '{print ($1 >= $2)}')" != "1" ]; then PY_MINOR="$("$PYTHON" -c 'import sys; print(sys.version_info.minor)')"
if [ "$PY_MAJOR" -lt 3 ] || { [ "$PY_MAJOR" -eq 3 ] && [ "$PY_MINOR" -lt 13 ]; }; then
PY_VER="${PY_MAJOR}.${PY_MINOR}"
echo "[!] Error: ArchiveBox requires Python >= 3.13, but found Python $PY_VER" echo "[!] Error: ArchiveBox requires Python >= 3.13, but found Python $PY_VER"
echo " Install python3.13: sudo apt install python3.13 python3.13-venv" echo " Install python3.13: sudo apt install python3.13 python3.13-venv"
exit 1 exit 1

View File

@@ -28,6 +28,14 @@ depends:
# All other runtime deps (node, chrome, yt-dlp, etc.) are installed on-demand # All other runtime deps (node, chrome, yt-dlp, etc.) are installed on-demand
# by `archivebox install` and should NOT be declared as package dependencies. # by `archivebox install` and should NOT be declared as package dependencies.
recommends:
# Common utilities used by archivebox extractors. Declared as recommends
# (not depends) so dpkg doesn't hard-fail if they're missing, but apt
# installs them by default so users have a working baseline out of the box.
- git
- curl
- wget
contents: contents:
# Wrapper script for /usr/bin/archivebox # Wrapper script for /usr/bin/archivebox
- src: pkg/debian/archivebox - src: pkg/debian/archivebox