@@ -42,9 +42,8 @@ def configure_ssh() -> None:
4242def on_workflow_dispatch (version : str ) -> None :
4343 semver = resolve_version (version )
4444 if semver .build is not None or semver .prerelease is not None :
45- # TODO: It might actually be nice to properly support prereleases.
4645 raise ValueError ("Only major, minor, and patch components should be set" )
47- update_pyproject_toml (semver )
46+ update_project_toml (semver )
4847 update_action_yml (semver )
4948 branch = git_push (semver )
5049 repo = GH .get_repo (REPO )
@@ -74,23 +73,23 @@ def resolve_version(bump: str) -> VersionInfo:
7473
7574
7675def current_version () -> VersionInfo :
77- with open (repo_file ("pyproject .toml" )) as f :
78- pyproject = f .read ()
79- m = re .search (r'version = "(.*)"' , pyproject )
76+ with open (repo_file ("julia" , "Project .toml" )) as f :
77+ project = f .read ()
78+ m = re .search (r'version = "(.*)"' , project )
8079 if not m :
81- raise ValueError ("Invalid pyproject .toml" )
80+ raise ValueError ("Invalid julia/Project .toml" )
8281 return VersionInfo .parse (m [1 ])
8382
8483
8584def repo_file (* paths : str ) -> str :
8685 return os .path .join (os .path .dirname (__file__ ), ".." , * paths )
8786
8887
89- def update_pyproject_toml (version : VersionInfo ) -> None :
90- path = repo_file ("pyproject .toml" )
88+ def update_project_toml (version : VersionInfo ) -> None :
89+ path = repo_file ("julia" , "Project .toml" )
9190 with open (path ) as f :
92- pyproject = f .read ()
93- updated = re .sub (r" version = .*" , f'version = "{ version } "' , pyproject , count = 1 )
91+ project = f .read ()
92+ updated = re .sub (r' version = " .*"' , f'version = "{ version } "' , project , count = 1 )
9493 with open (path , "w" ) as f :
9594 f .write (updated )
9695
0 commit comments