mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 22:42:29 +03:00
nightly: archive older versions; remove archive if git mirror is full
This commit is contained in:
parent
6e7e9b355c
commit
5a2534b604
1 changed files with 5 additions and 1 deletions
|
@ -102,6 +102,8 @@ def main():
|
||||||
help=_('The file to be included in the repo (path or glob)'))
|
help=_('The file to be included in the repo (path or glob)'))
|
||||||
parser.add_argument("--no-checksum", action="store_true", default=False,
|
parser.add_argument("--no-checksum", action="store_true", default=False,
|
||||||
help=_("Don't use rsync checksums"))
|
help=_("Don't use rsync checksums"))
|
||||||
|
parser.add_argument("--archive-older", default=20,
|
||||||
|
help=_("Set maximum releases in repo before older ones are archived"))
|
||||||
# TODO add --with-btlog
|
# TODO add --with-btlog
|
||||||
options = parser.parse_args()
|
options = parser.parse_args()
|
||||||
|
|
||||||
|
@ -233,6 +235,7 @@ Last updated: {date}'''.format(repo_git_base=repo_git_base,
|
||||||
config += "archive_name = '%s'\n" % (repo_git_base + ' archive')
|
config += "archive_name = '%s'\n" % (repo_git_base + ' archive')
|
||||||
config += "archive_url = '%s'\n" % (repo_base + '/archive')
|
config += "archive_url = '%s'\n" % (repo_base + '/archive')
|
||||||
config += "archive_icon = 'icon.png'\n"
|
config += "archive_icon = 'icon.png'\n"
|
||||||
|
config += "archive_older = %i\n" % options.archive_older
|
||||||
config += "servergitmirrors = '%s'\n" % servergitmirror
|
config += "servergitmirrors = '%s'\n" % servergitmirror
|
||||||
config += "keystore = '%s'\n" % KEYSTORE_FILE
|
config += "keystore = '%s'\n" % KEYSTORE_FILE
|
||||||
config += "repo_keyalias = '%s'\n" % KEY_ALIAS
|
config += "repo_keyalias = '%s'\n" % KEY_ALIAS
|
||||||
|
@ -293,7 +296,8 @@ Last updated: {date}'''.format(repo_git_base=repo_git_base,
|
||||||
|
|
||||||
if not options.no_deploy:
|
if not options.no_deploy:
|
||||||
try:
|
try:
|
||||||
subprocess.check_call(['fdroid', 'server', 'update', '--verbose'], cwd=repo_basedir)
|
cmd = ['fdroid', 'server', 'update', '--verbose', '--no-keep-git-mirror-archive']
|
||||||
|
subprocess.check_call(cmd, cwd=repo_basedir)
|
||||||
except subprocess.CalledProcessError:
|
except subprocess.CalledProcessError:
|
||||||
logging.error(_('cannot publish update, did you set the deploy key?')
|
logging.error(_('cannot publish update, did you set the deploy key?')
|
||||||
+ '\n' + deploy_key_url)
|
+ '\n' + deploy_key_url)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue