[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [gettor/master] Exit with non-zero code if some uploads fail
commit ee8d5a85ff6388a27c6aecadcaec3d7c6c920ec6
Author: Cecylia Bocovich <cohosh@xxxxxxxxxxxxxx>
Date: Mon Nov 25 15:02:23 2019 -0500
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.
---
scripts/update_files | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/scripts/update_files b/scripts/update_files
index ab45930..827d7d5 100755
--- a/scripts/update_files
+++ b/scripts/update_files
@@ -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:
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits