Skip to content

Commit 033cca3

Browse files
committed
ci: also run ruff format over update-upstream.py
1 parent 0c19020 commit 033cca3

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

update-upstream.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ def git(*args: str, cwd: str | os.PathLike = submodule, capture: bool = False) -
6060
print(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)
6464
git('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)
6666
upstream_latest_tag = git('describe', '--tags', '--abbrev=0', capture=True).stdout.strip()
6767
upstream_version = upstream_latest_tag.removeprefix('pkgconf-')
6868
upstream_version_tuple = tuple(upstream_version.split('.'))
@@ -71,12 +71,14 @@ def git(*args: str, cwd: str | os.PathLike = submodule, capture: bool = False) -
7171
if 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

Comments
 (0)