From 496b54a5e1e6ed15e86a8230ed9f02cf20527ba7 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 15 Mar 2026 03:20:32 +0000 Subject: [PATCH] Fix remaining PR review comments: release ordering, verification, README - Move .deb upload to GitHub Release into a separate job that runs after tests pass - Fix workflow_call event propagation so release jobs run when called from release.yml - Fix setup.sh post-install verification to check `which archivebox` first (works for brew/deb) - Fix README.md: detect architecture with dpkg instead of hardcoding amd64 - Fix README.md: remove --setup flag from apt install instructions https://claude.ai/code/session_01Vx1EsNrNySgsc8Y67dGzCn --- .github/workflows/debian.yml | 28 +++++++++++++++++++++------- .github/workflows/homebrew.yml | 2 +- README.md | 5 +++-- bin/setup.sh | 29 +++++++++++++++++++---------- 4 files changed, 44 insertions(+), 20 deletions(-) diff --git a/.github/workflows/debian.yml b/.github/workflows/debian.yml index b3c9abad..06aac13e 100644 --- a/.github/workflows/debian.yml +++ b/.github/workflows/debian.yml @@ -64,13 +64,6 @@ jobs: name: archivebox-${{ steps.version.outputs.version }}-${{ matrix.arch }}.deb path: dist/*.deb - - name: Upload .deb to GitHub Release - if: github.event_name == 'release' - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - gh release upload "${{ github.event.release.tag_name }}" dist/*.deb --clobber - test: needs: build runs-on: ubuntu-24.04 @@ -157,3 +150,24 @@ jobs: run: | test -f /usr/lib/systemd/system/archivebox.service cat /usr/lib/systemd/system/archivebox.service + + # Upload .deb to GitHub Release only after tests pass + release: + if: github.event_name == 'release' || github.event_name == 'workflow_call' + needs: [build, test] + runs-on: ubuntu-24.04 + permissions: + contents: write + + steps: + - name: Download all .deb artifacts + uses: actions/download-artifact@v4 + with: + pattern: archivebox-*.deb + merge-multiple: true + + - name: Upload .deb to GitHub Release + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh release upload "${{ github.event.release.tag_name }}" *.deb --clobber diff --git a/.github/workflows/homebrew.yml b/.github/workflows/homebrew.yml index 838b323b..ca475917 100644 --- a/.github/workflows/homebrew.yml +++ b/.github/workflows/homebrew.yml @@ -171,7 +171,7 @@ RUBY # On release only: generate the real formula with PyPI URL and push to tap release: - if: github.event_name == 'release' + if: github.event_name == 'release' || github.event_name == 'workflow_call' needs: build-and-test runs-on: macos-latest diff --git a/README.md b/README.md index 66b9126f..0d58f7f9 100644 --- a/README.md +++ b/README.md @@ -297,14 +297,15 @@ See below for more usage examples using the C
  1. Download and install the .deb package from the latest release.
    # download the .deb for your architecture (amd64 or arm64)
    -curl -fsSL "https://github.com/ArchiveBox/ArchiveBox/releases/latest/download/archivebox_amd64.deb" -o /tmp/archivebox.deb
    +ARCH="$(dpkg --print-architecture)"
    +curl -fsSL "https://github.com/ArchiveBox/ArchiveBox/releases/latest/download/archivebox_${ARCH}.deb" -o /tmp/archivebox.deb
     sudo apt install /tmp/archivebox.deb
     archivebox version                         # make sure all dependencies are installed
     
  2. Create a new empty directory and initialize your collection (can be anywhere).
    mkdir -p ~/archivebox/data && cd ~/archivebox/data
    -archivebox init --setup
    +archivebox init
     

  3. diff --git a/bin/setup.sh b/bin/setup.sh index 91cd6681..d6a89fa7 100755 --- a/bin/setup.sh +++ b/bin/setup.sh @@ -155,19 +155,28 @@ fi echo -if ! (python3 --version && python3 -m pip --version && python3 -m django --version); then - echo "[X] Python 3 pip was not found on your system!" - echo " You must first install Python >= 3.7 (and pip3):" - echo " https://www.python.org/downloads/" - echo " https://wiki.python.org/moin/BeginnersGuide/Download" - echo " After installing, run this script again." - exit 1 +if ! which archivebox > /dev/null 2>&1; then + # If archivebox isn't in PATH (e.g. pip install), check python modules directly + if ! (python3 --version && python3 -m pip --version && python3 -m django --version) 2>/dev/null; then + echo "[X] Python 3 pip was not found on your system!" + echo " You must first install Python >= 3.7 (and pip3):" + echo " https://www.python.org/downloads/" + echo " https://wiki.python.org/moin/BeginnersGuide/Download" + echo " After installing, run this script again." + exit 1 + fi + + if ! (python3 -m django --version && python3 -m pip show archivebox) 2>/dev/null; then + echo "[X] Django and ArchiveBox were not found after installing!" + echo " Check to see if a previous step failed." + echo + exit 1 + fi fi -if ! (python3 -m django --version && python3 -m pip show archivebox && which -a archivebox); then - echo "[X] Django and ArchiveBox were not found after installing!" +if ! which archivebox > /dev/null 2>&1; then + echo "[X] archivebox command was not found in PATH after installing!" echo " Check to see if a previous step failed." - echo exit 1 fi