diff options
author | Florian Bruhin <me@the-compiler.org> | 2023-08-16 19:28:04 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2023-08-17 12:39:00 +0200 |
commit | 66f654b95ca4d270a38e1d2aa4e9f1d1dc02d994 (patch) | |
tree | 4279c03f48ae17e7b60ae15473f985996d914da3 | |
parent | a59bf7bc5bc9ec863fd359be453e326c727008ce (diff) | |
download | qutebrowser-66f654b95ca4d270a38e1d2aa4e9f1d1dc02d994.tar.gz qutebrowser-66f654b95ca4d270a38e1d2aa4e9f1d1dc02d994.zip |
scripts: Avoid inputs on CI when releasing
-rwxr-xr-x | scripts/dev/build_release.py | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/scripts/dev/build_release.py b/scripts/dev/build_release.py index fe2ec16c3..64978aba2 100755 --- a/scripts/dev/build_release.py +++ b/scripts/dev/build_release.py @@ -598,6 +598,10 @@ def github_upload( if asset.name == artifact.path.name] if assets: print(f"Assets already exist: {assets}") + + if utils.ON_CI: + sys.exit(1) + print("Press enter to continue anyways or Ctrl-C to abort.") input() @@ -611,8 +615,13 @@ def github_upload( ) except github3.exceptions.ConnectionError as e: utils.print_error(f'Failed to upload: {e}') - print("Press Enter to retry...", file=sys.stderr) - input() + if utils.ON_CI: + print("Retrying in 30s...") + time.sleep(30) + else: + print("Press Enter to retry...", file=sys.stderr) + input() + print("Retrying!") assets = [asset for asset in release.assets() @@ -709,7 +718,7 @@ def main() -> None: if args.upload: version_tag = f"v{qutebrowser.__version__}" - if not args.no_confirm: + if not args.no_confirm and not utils.ON_CI: utils.print_title(f"Press enter to release {version_tag}...") input() |