(cargo_toml, new_sha)
| 65 | |
| 66 | |
| 67 | def update_commit_cargo_toml(cargo_toml, new_sha): |
| 68 | print('updating {}'.format(cargo_toml.absolute())) |
| 69 | with open(cargo_toml) as f: |
| 70 | data = f.read() |
| 71 | |
| 72 | doc = tomlkit.parse(data) |
| 73 | |
| 74 | update_commit_dependencies(doc.get('dependencies'), new_sha) |
| 75 | update_commit_dependencies(doc.get('dev-dependencies'), new_sha) |
| 76 | |
| 77 | with open(cargo_toml, 'w') as f: |
| 78 | f.write(tomlkit.dumps(doc)) |
| 79 | |
| 80 | |
| 81 | def update_version_cargo_toml(cargo_toml, new_version): |