Keep setup bootstrap aligned with abxpkg lock

This commit is contained in:
Nick Sweeting 2026-08-17 16:13:53 -07:00
parent 4c244a28a6
commit d479dbe4d1
No known key found for this signature in database
2 changed files with 22 additions and 1 deletions

View File

@ -51,3 +51,24 @@ print(version)
PY
uv lock --no-cache
uv run --no-cache --no-project python - <<'PY'
from pathlib import Path
import re
import tomllib
packages = tomllib.loads(Path('uv.lock').read_text())['package']
abxpkg_version = next(package['version'] for package in packages if package['name'] == 'abxpkg')
setup_path = Path('bin/setup.sh')
setup = setup_path.read_text()
updated, count = re.subn(
r'^(ABXPKG_PACKAGE="\$\{ABXPKG_PACKAGE:-abxpkg==)[^}"]+(\}")$',
rf'\g<1>{abxpkg_version}\g<2>',
setup,
count=1,
flags=re.MULTILINE,
)
if count != 1:
raise SystemExit('Failed to update ABXPKG_PACKAGE in bin/setup.sh')
setup_path.write_text(updated)
PY

View File

@ -81,7 +81,7 @@ ARCHIVEBOX_PYTHON="${ARCHIVEBOX_PYTHON:-3.13}"
ARCHIVEBOX_PACKAGE="${ARCHIVEBOX_PACKAGE:-archivebox>=0.9.0rc0,<0.10}"
ARCHIVEBOX_PLATFORM="${ARCHIVEBOX_PLATFORM:-}"
ARCHIVEBOX_COMPOSE_URL="${ARCHIVEBOX_COMPOSE_URL:-https://raw.githubusercontent.com/ArchiveBox/ArchiveBox/${ARCHIVEBOX_BRANCH}/docker-compose.yml}"
ABXPKG_PACKAGE="${ABXPKG_PACKAGE:-abxpkg==1.12.95}"
ABXPKG_PACKAGE="${ABXPKG_PACKAGE:-abxpkg==1.12.96}"
ABXPKG_LIB_DIR="${ABXPKG_LIB_DIR:-$HOME/.cache/archivebox/setup-abxpkg}"
ARCHIVEBOX_HOME_DIR="$HOME/archivebox"
ARCHIVEBOX_DATA_DIR="$ARCHIVEBOX_HOME_DIR/data"