diff --git a/bin/release.sh b/bin/release.sh index 6216e756..229a1f97 100755 --- a/bin/release.sh +++ b/bin/release.sh @@ -36,6 +36,12 @@ PY )" SLUG="$($GH_BINARY repo view --json nameWithOwner --jq .nameWithOwner)" TAG="${TAG_PREFIX}${VERSION}" +RELEASE_BRANCH="${RELEASE_BRANCH:-dev}" + +if [[ "$RELEASE_BRANCH" != main && ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+rc[0-9]+$ ]]; then + echo "Refusing to publish non-main ArchiveBox release $VERSION from $RELEASE_BRANCH; dev releases must be 0.9.XrcX prereleases" >&2 + exit 1 +fi PYPI_VERSIONS="$($CURL_BINARY -fsSL "https://pypi.org/pypi/${PYPI_PACKAGE}/json" | $JQ_BINARY -r '.releases | keys[]')" GITHUB_TAGS="$($GH_BINARY api "repos/${SLUG}/releases?per_page=100" --jq '.[].tag_name')" @@ -78,8 +84,8 @@ fi [[ "$RELEASE_SHA" =~ ^[0-9a-f]{40}$ ]] [[ "$($GIT_BINARY rev-parse HEAD)" == "$RELEASE_SHA" ]] [[ -z "$($GIT_BINARY status --short)" ]] -$GIT_BINARY fetch --quiet --no-tags origin "+refs/heads/${RELEASE_BRANCH:-dev}:refs/remotes/origin/${RELEASE_BRANCH:-dev}" -$GIT_BINARY merge-base --is-ancestor "$RELEASE_SHA" "refs/remotes/origin/${RELEASE_BRANCH:-dev}" +$GIT_BINARY fetch --quiet --no-tags origin "+refs/heads/${RELEASE_BRANCH}:refs/remotes/origin/${RELEASE_BRANCH}" +$GIT_BINARY merge-base --is-ancestor "$RELEASE_SHA" "refs/remotes/origin/${RELEASE_BRANCH}" [[ "$(<"$RELEASE_DISTRIBUTIONS_DIR/COMMIT_SHA")" == "$RELEASE_SHA" ]] $UV_BINARY run --no-project python - "$RELEASE_DISTRIBUTIONS_DIR" "$VERSION" <<'PY' diff --git a/etc/package.json b/etc/package.json index 3363a31f..65558b9f 100644 --- a/etc/package.json +++ b/etc/package.json @@ -1,6 +1,6 @@ { "name": "archivebox", - "version": "0.9.35rc154", + "version": "0.9.35rc155", "repository": "github:ArchiveBox/ArchiveBox", "license": "MIT", "dependencies": { diff --git a/pyproject.toml b/pyproject.toml index 30bda532..498c5da7 100755 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "archivebox" -version = "0.9.35rc154" +version = "0.9.35rc155" requires-python = ">=3.13" description = "Self-hosted internet archiving solution." authors = [{name = "Nick Sweeting", email = "pyproject.toml@archivebox.io"}] @@ -348,7 +348,7 @@ Donate = "https://github.com/ArchiveBox/ArchiveBox/wiki/Donations" [tool.bumpver] -current_version = "v0.9.35rc154" +current_version = "v0.9.35rc155" version_pattern = "vMAJOR.MINOR.PATCH[PYTAGNUM]" commit_message = "bump version {old_version} -> {new_version}" tag_message = "{new_version}" diff --git a/uv.lock b/uv.lock index 07eeb42e..621c4117 100644 --- a/uv.lock +++ b/uv.lock @@ -123,7 +123,7 @@ wheels = [ [[package]] name = "archivebox" -version = "0.9.35rc154" +version = "0.9.35rc155" source = { editable = "." } dependencies = [ { name = "abx-dl" },