@@ -60,9 +60,9 @@ def git(*args: str, cwd: str | os.PathLike = submodule, capture: bool = False) -
6060print (f'{ yellow } Current version: { downstream_version } { reset } ' )
6161
6262# Get the latest upstream version
63- #subprocess.check_output(['git', 'fetch', 'origin', 'master'], cwd=submodule)
63+ # subprocess.check_output(['git', 'fetch', 'origin', 'master'], cwd=submodule)
6464git ('fetch' , 'origin' , 'master' )
65- #upstream_latest_tag = subprocess.check_output(['git', 'describe', -'-tags', '--abbrev=0'], cwd=submodule)
65+ # upstream_latest_tag = subprocess.check_output(['git', 'describe', -'-tags', '--abbrev=0'], cwd=submodule)
6666upstream_latest_tag = git ('describe' , '--tags' , '--abbrev=0' , capture = True ).stdout .strip ()
6767upstream_version = upstream_latest_tag .removeprefix ('pkgconf-' )
6868upstream_version_tuple = tuple (upstream_version .split ('.' ))
@@ -71,12 +71,14 @@ def git(*args: str, cwd: str | os.PathLike = submodule, capture: bool = False) -
7171if upstream_version_tuple > downstream_version_tuple :
7272 print (f'{ yellow } Found new upstream version: { upstream_version } (current: { downstream_version } ){ reset } ' )
7373 print (f'{ yellow } Updating...{ reset } ' )
74- #subprocess.check_output(['git', 'checkout', upstream_latest_tag], cwd=submodule)
74+ # subprocess.check_output(['git', 'checkout', upstream_latest_tag], cwd=submodule)
7575 git ('checkout' , upstream_latest_tag )
7676 new_downstream_version = f'{ upstream_version } -0'
7777 print (f'{ yellow } New version: { new_downstream_version } { reset } ' )
7878 for file in version_files :
79- file .write_text (file .read_text ().replace (
80- f"'{ downstream_version } '" ,
81- f"'{ new_downstream_version } '" ,
82- ))
79+ file .write_text (
80+ file .read_text ().replace (
81+ f"'{ downstream_version } '" ,
82+ f"'{ new_downstream_version } '" ,
83+ )
84+ )
0 commit comments