diff --git a/fdroidserver/nightly.py b/fdroidserver/nightly.py index c8076ebb..c31571ff 100644 --- a/fdroidserver/nightly.py +++ b/fdroidserver/nightly.py @@ -93,6 +93,8 @@ def main(): help=_("Print the secret variable to the terminal for easy copy/paste")) parser.add_argument("--keep-private-keys", action="store_true", default=False, help=_("Do not remove the private keys generated from the keystore")) + parser.add_argument("--no-deploy", action="store_true", default=False, + help=_("Do not deploy the new files to the repo")) parser.add_argument("--file", default='app/build/outputs/apk/*.apk', help=_('The the file to be included in the repo (path or glob)')) parser.add_argument("--no-checksum", action="store_true", default=False, @@ -285,12 +287,15 @@ Last updated: {date}'''.format(repo_git_base=repo_git_base, common.local_rsync(options, repo_basedir + '/metadata/', git_mirror_metadatadir + '/') mirror_git_repo.git.add(all=True) mirror_git_repo.index.commit("update app metadata") - try: - subprocess.check_call(['fdroid', 'server', 'update', '--verbose'], cwd=repo_basedir) - except subprocess.CalledProcessError: - logging.error(_('cannot publish update, did you set the deploy key?') - + '\n' + deploy_key_url) - sys.exit(1) + + if not options.no_deploy: + try: + subprocess.check_call(['fdroid', 'server', 'update', '--verbose'], cwd=repo_basedir) + except subprocess.CalledProcessError: + logging.error(_('cannot publish update, did you set the deploy key?') + + '\n' + deploy_key_url) + sys.exit(1) + if not options.keep_private_keys: os.remove(KEYSTORE_FILE) if shutil.rmtree.avoids_symlink_attacks: