Skip to content

Commit

Permalink
github-release: return error when one repo sync fails
Browse files Browse the repository at this point in the history
  • Loading branch information
taoky committed Aug 7, 2024
1 parent b1dbf26 commit 4ae0d8b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions github-release/tunasync/github-release.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@ def link_latest(name, repo_dir):
os.symlink(name, repo_dir / "LatestRelease")
except OSError:
pass

success = True

for cfg in REPOS:
flat = False # build a folder for each release
Expand Down Expand Up @@ -241,6 +243,7 @@ def link_latest(name, repo_dir):
releases = r.json()
except:
traceback.print_exc()
success = False
break

n_downloaded = 0
Expand Down Expand Up @@ -289,6 +292,9 @@ def link_latest(name, repo_dir):
pass

print("Total size is", sizeof_fmt(total_size, suffix=""))

if not success:
sys.exit(1)


if __name__ == "__main__":
Expand Down

0 comments on commit 4ae0d8b

Please sign in to comment.