Skip to content

Commit

Permalink
Print subprocess error
Browse files Browse the repository at this point in the history
  • Loading branch information
fcollonval committed Dec 15, 2021
1 parent cee24be commit 5518a19
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions scripts/02_update_catalogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,21 +205,31 @@ def get_min(clause):

if semversion in range:
print(f"\nMerge version {version!s} for `{package_name}`.\n")
update_repo(package_name, url, tag)
update_catalog(package_name, current_version, should_merge)
try:
update_repo(package_name, url, tag)
update_catalog(package_name, current_version, should_merge)
except subprocess.CalledProcessError as e:
print(e.stdout)
print(e.stderr)
raise e
should_merge = True

# This allows to break when the version is below the supported range. But it breaks merging tags if newer security release
# on older versions are carried out like for JupyterLab --> We scan for all first 100 tags
# elif semversion < min_version:
# print(f"\nNext available version {semversion!s} for `{package_name}` is below the supported range {range!s}.\n")
# break

# The final step is to merge the current version so the POT file is tagged accordingly
# This is suboptimal as it was probably already extracted but it ensures strings are
# the latest one including white space changes (that apparently are ignored see https://github.com/jupyterlab/language-packs/pull/116)
update_repo(package_name, url, current_version)
update_catalog(package_name, current_version, should_merge)
try:
update_repo(package_name, url, current_version)
update_catalog(package_name, current_version, should_merge)
except subprocess.CalledProcessError as e:
print(e.stdout)
print(e.stderr)
raise e

delta = round(time.time() - start_run_time, 0)
print(f"\n\n\nCatalogs updated in {delta} seconds\n")

0 comments on commit 5518a19

Please sign in to comment.