diff --git a/bin/bump_version.sh b/bin/bump_version.sh index b001f9e8..b9bd227b 100755 --- a/bin/bump_version.sh +++ b/bin/bump_version.sh @@ -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 diff --git a/bin/setup.sh b/bin/setup.sh index 211b1515..eeb602c1 100755 --- a/bin/setup.sh +++ b/bin/setup.sh @@ -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"