Skip to content

Commit 0d4ae9c

Browse files
authored
Bump Python client version (pyproject.toml + uv.lock) in the release script (apache#5188)
1 parent 8b5328b commit 0d4ae9c

3 files changed

Lines changed: 15 additions & 0 deletions

File tree

.github/workflows/release-2-update-release-candidate.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,8 @@ jobs:
199199
"$HELM_VALUES_FILE" \
200200
"$HELM_VALUES_SCHEMA_FILE" \
201201
"$HELM_REFERENCE_DOC_FILE" \
202+
"$PYTHON_PYPROJECT_FILE" \
203+
"$PYTHON_UV_LOCK_FILE" \
202204
"$CHANGELOG_FILE"
203205
exec_process git commit -m "[chore] Bump version to ${version_without_rc}"
204206

releasey/libs/_constants.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,5 @@ HELM_README_FILE="$LIBS_DIR/../../helm/polaris/README.md"
4141
HELM_VALUES_FILE="$LIBS_DIR/../../helm/polaris/values.yaml"
4242
HELM_VALUES_SCHEMA_FILE="$LIBS_DIR/../../helm/polaris/values.schema.json"
4343
HELM_REFERENCE_DOC_FILE="$LIBS_DIR/../../site/content/in-dev/unreleased/helm-chart/reference.md"
44+
PYTHON_PYPROJECT_FILE="$LIBS_DIR/../../client/python/pyproject.toml"
45+
PYTHON_UV_LOCK_FILE="$LIBS_DIR/../../client/python/uv.lock"

releasey/libs/_version.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ function update_version {
9090
local version="$1"
9191
update_version_txt "${version}"
9292
update_helm_version "${version}"
93+
update_python_version "${version}"
9394
}
9495

9596
function update_version_txt {
@@ -124,6 +125,16 @@ function update_helm_version {
124125
exec_process sed -E -i~ 's/^([[:space:]]+tag: )"latest".*$/\1"'"${new_version}"'"/' "$HELM_VALUES_FILE"
125126
}
126127

128+
function update_python_version {
129+
local new_version="$1"
130+
# The Python client version lives in pyproject.toml and is mirrored in the
131+
# uv.lock lockfile. In both files the version follows the "apache-polaris"
132+
# package name declaration, so we anchor the substitution on that line to
133+
# avoid touching unrelated dependency versions.
134+
exec_process sed -E -i~ '/^name = "apache-polaris"$/{n;s/^version = ".*"/version = "'"${new_version}"'"/;}' "$PYTHON_PYPROJECT_FILE"
135+
exec_process sed -E -i~ '/^name = "apache-polaris"$/{n;s/^version = ".*"/version = "'"${new_version}"'"/;}' "$PYTHON_UV_LOCK_FILE"
136+
}
137+
127138
function find_next_rc_number {
128139
# This function finds the next available RC number for a given version.
129140
# It returns 0 and sets the global variable rc_number to the next available RC number.

0 commit comments

Comments
 (0)