Skip to content

Commit fdbb1b3

Browse files
fix(release): keep version metadata in sync
1 parent 05e505e commit fdbb1b3

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

docs/src/release/creating-a-release.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,12 +212,12 @@ After cutting the release branch, bump `main` to the next version so that ongoin
212212
```bash
213213
git checkout main
214214
./scripts/bump-version.sh ${RELEASE_VERSION} ${NEXT_VERSION}
215-
git add Cargo.toml
215+
git add Cargo.toml Cargo.lock DEPENDENCIES.rust.tsv '**/DEPENDENCIES.rust.tsv'
216216
git commit -m "chore: bump version to ${NEXT_VERSION}"
217217
git push origin main
218218
```
219219

220-
The script updates `version` in root `Cargo.toml` (`[workspace.package]` and the `paimon` entry in `[workspace.dependencies]`). All member crates inherit the workspace version.
220+
The script updates `version` in root `Cargo.toml` (`[workspace.package]` and the `paimon` entry in `[workspace.dependencies]`), refreshes `Cargo.lock`, and regenerates the dependency reports. It requires Python 3.11+ and cargo-deny 0.19.6; set `PYTHON` when Python 3.11+ is not available as `python3`. All member crates inherit the workspace version.
221221

222222
### Optional: Create PRs for release blog and download page
223223

scripts/bump-version.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616
#
17-
# Bump version in root Cargo.toml ([workspace.package] and [workspace.dependencies]).
17+
# Bump the workspace version and refresh locked release metadata.
1818
# Run from repo root.
1919
#
2020
# Usage: ./scripts/bump-version.sh <current_version> <next_version>
@@ -33,6 +33,7 @@ TO_VERSION="$2"
3333

3434
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
3535
cd "$REPO_ROOT"
36+
PYTHON="${PYTHON:-python3}"
3637

3738
if [ ! -f Cargo.toml ]; then
3839
echo "Cargo.toml not found. Run from repo root."
@@ -52,5 +53,10 @@ case "$(uname -s)" in
5253
;;
5354
esac
5455

55-
echo "Bumped version from ${FROM_VERSION} to ${TO_VERSION} in Cargo.toml"
56-
echo "Review with: git diff Cargo.toml"
56+
cargo update -p paimon --precise "${TO_VERSION}"
57+
PYTHONDONTWRITEBYTECODE=1 "${PYTHON}" scripts/dependencies.py generate
58+
PYTHONDONTWRITEBYTECODE=1 "${PYTHON}" scripts/dependencies.py verify
59+
60+
echo "Bumped version from ${FROM_VERSION} to ${TO_VERSION}"
61+
echo "Updated Cargo.toml, Cargo.lock, and dependency reports"
62+
echo "Review with: git diff -- Cargo.toml Cargo.lock DEPENDENCIES.rust.tsv '**/DEPENDENCIES.rust.tsv'"

0 commit comments

Comments
 (0)