(cargo_toml: str, new_version: str)
| 76 | |
| 77 | |
| 78 | def update_datafusion_version(cargo_toml: str, new_version: str): |
| 79 | print(f'updating {cargo_toml}') |
| 80 | with open(cargo_toml) as f: |
| 81 | data = f.read() |
| 82 | |
| 83 | doc = tomlkit.parse(data) |
| 84 | pkg = doc.get('package') |
| 85 | if 'workspace' not in pkg['version']: |
| 86 | pkg['version'] = new_version |
| 87 | |
| 88 | with open(cargo_toml, 'w') as f: |
| 89 | f.write(tomlkit.dumps(doc)) |
| 90 | |
| 91 | def update_downstream_versions(cargo_toml: str, new_version: str): |
| 92 | with open(cargo_toml) as f: |