This is an automated email from the ASF dual-hosted git repository.
fokko pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-rust.git
The following commit(s) were added to refs/heads/main by this push:
new 2715d528 CI: Fix Nightly PyPi GitHub Action (#1689)
2715d528 is described below
commit 2715d5287d4a83db4960dd7506e100612f529ce1
Author: Kevin Liu <[email protected]>
AuthorDate: Thu Sep 18 00:50:29 2025 -0700
CI: Fix Nightly PyPi GitHub Action (#1689)
---
.github/actions/overwrite-package-version/action.yml | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/.github/actions/overwrite-package-version/action.yml
b/.github/actions/overwrite-package-version/action.yml
index ddf215ce..8a273945 100644
--- a/.github/actions/overwrite-package-version/action.yml
+++ b/.github/actions/overwrite-package-version/action.yml
@@ -38,15 +38,24 @@ runs:
env:
TIMESTAMP: ${{ inputs.timestamp }}
run: |
+ # Read the current version from the Rust crate's Cargo.toml
CURRENT_VERSION=$(python -c "import toml;
print(toml.load('bindings/python/Cargo.toml')['package']['version'])")
export NEW_VERSION="${CURRENT_VERSION}.dev${TIMESTAMP}"
+ echo "Current version: ${CURRENT_VERSION}"
+ echo "New dev version: ${NEW_VERSION}"
+
+ # Update bindings/python/pyproject.toml:
+ # - Set project.version = NEW_VERSION
+ # - Ensure 'version' is not listed in project.dynamic
python -c "
import toml
import os
- config = toml.load('bindings/python/Cargo.toml')
+ config = toml.load('bindings/python/pyproject.toml')
new_version = os.environ['NEW_VERSION']
- config['package']['version'] = new_version
- with open('bindings/python/Cargo.toml', 'w') as f:
+ config['project']['version'] = new_version
+ if 'dynamic' in config['project']:
+ config['project']['dynamic'] = [v for v in
config['project']['dynamic'] if v != 'version']
+ with open('bindings/python/pyproject.toml', 'w') as f:
toml.dump(config, f)
print(f'Updated version to: {new_version}')
"
\ No newline at end of file