File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,12 @@ def contains_uncommitted_change(filepath: str):
6565@click .argument ("component" )
6666@click .option ("--no-release" , is_flag = True )
6767def main (component : str , no_release : bool ) -> None :
68+ if contains_uncommitted_change ("README.md" ):
69+ raise RuntimeError (
70+ "README.md contains uncommitted change. "
71+ "Please clean it up before rerun the script."
72+ )
73+
6874 print ("Calculating new version......" )
6975
7076 old_version_info = semver .VersionInfo .parse (current_version .lstrip ("v" ))
@@ -87,11 +93,6 @@ def main(component: str, no_release: bool) -> None:
8793
8894 run (["git" , "add" , "fetcher/__version__.py" ])
8995
90- if contains_uncommitted_change ("README.md" ):
91- raise RuntimeError (
92- "README.md contains uncommitted change. "
93- "Please clean it up before rerun the script."
94- )
9596 run (["git" , "add" , "README.md" ])
9697
9798 print ("Committing the special commit for bumping version......" )
You can’t perform that action at this time.
0 commit comments