GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

Commit ee8d5a85 authored by Cecylia Bocovich's avatar Cecylia Bocovich

Exit with non-zero code if some uploads fail

The script will continue with the rest of the uploads but will exit with
a non-zero code so that we'll be notified to upload the missing files
manually.
parent 7496d112
......@@ -9,6 +9,8 @@ import subprocess
REPO_NAME = "TheTorProject/gettorbrowser"
failure = False
def delete_old_releases(repo):
for release in repo.get_releases():
release.delete_release()
......@@ -28,6 +30,7 @@ def upload_files(release):
except:
print("Error: failed to download "+url)
print("Please upload this file manually.")
failure = True
......@@ -43,6 +46,9 @@ def main(token):
release = repo.create_git_release("torbrowser-release", "Tor Browser releases", "These releases were uploaded to be distributed with gettor.")
upload_files(release)
if failure:
sys.exit(1)
if __name__ == "__main__":
if len(sys.argv) != 2:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment