mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-03 17:50:11 +02:00
nightly: --no-deploy option to skip rsyncing repo
This commit is contained in:
parent
881074b2aa
commit
deccd013c9
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user