|
9 | 9 |
|
10 | 10 | assert not new_backend_version.startswith("v"), "Version should not start with 'v'" |
11 | 11 |
|
12 | | -pyproject_toml = Path(__file__).parent / ".." / ".." / "pyproject.toml" |
13 | | -juliapkg_json = Path(__file__).parent / ".." / ".." / "pysr" / "juliapkg.json" |
| 12 | +repo_root = Path(__file__).parent / ".." / ".." |
| 13 | +pyproject_toml = repo_root / "pyproject.toml" |
| 14 | +juliapkg_json = repo_root / "pysr" / "juliapkg.json" |
| 15 | +release_please_manifest = repo_root / ".release-please-manifest.json" |
14 | 16 |
|
15 | 17 | with open(pyproject_toml) as toml_file: |
16 | 18 | pyproject_data = tomlkit.parse(toml_file.read()) |
17 | 19 |
|
18 | 20 | with open(juliapkg_json) as f: |
19 | 21 | juliapkg_data = json.load(f) |
20 | 22 |
|
| 23 | +with open(release_please_manifest) as f: |
| 24 | + release_please_manifest_data = json.load(f) |
| 25 | + |
21 | 26 | current_version = pyproject_data["project"]["version"] |
22 | 27 | parts = current_version.split(".") |
23 | 28 |
|
|
52 | 57 | new_version = f"{major}.{minor}.{new_patch}{new_suffix}{extra_parts}" |
53 | 58 |
|
54 | 59 | pyproject_data["project"]["version"] = new_version |
| 60 | +release_please_manifest_data["."] = new_version |
55 | 61 |
|
56 | 62 | # Update backend - maintain current format (either "rev" or "version") |
57 | 63 | backend_pkg = juliapkg_data["packages"]["SymbolicRegression"] |
|
69 | 75 |
|
70 | 76 | with open(juliapkg_json, "w") as f: |
71 | 77 | json.dump(juliapkg_data, f, indent=4) |
72 | | - # Ensure ends with newline |
| 78 | + f.write("\n") |
| 79 | + |
| 80 | +with open(release_please_manifest, "w") as f: |
| 81 | + json.dump(release_please_manifest_data, f, indent=2) |
73 | 82 | f.write("\n") |
0 commit comments