mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-04 14:30:30 +03:00
nightly: convert to config.yml
This commit is contained in:
parent
1c5506ae05
commit
9c0eaac121
1 changed files with 21 additions and 22 deletions
|
|
@ -328,28 +328,27 @@ Last updated: {date}'''.format(repo_git_base=repo_git_base,
|
||||||
with open(ssh_config, 'a') as fp:
|
with open(ssh_config, 'a') as fp:
|
||||||
fp.write('\n\nHost *\n\tIdentityFile %s\n' % ssh_private_key_file)
|
fp.write('\n\nHost *\n\tIdentityFile %s\n' % ssh_private_key_file)
|
||||||
|
|
||||||
config = ''
|
config = {
|
||||||
config += "identity_file = '%s'\n" % ssh_private_key_file
|
'identity_file': ssh_private_key_file,
|
||||||
config += "repo_name = '%s'\n" % repo_git_base
|
'repo_name': repo_git_base,
|
||||||
config += "repo_url = '%s'\n" % repo_url
|
'repo_url': repo_url,
|
||||||
config += "repo_description = 'Nightly builds from %s'\n" % git_user_email
|
'repo_description': 'Nightly builds from %s' % git_user_email,
|
||||||
config += "archive_name = '%s'\n" % (repo_git_base + ' archive')
|
'archive_name': repo_git_base + ' archive',
|
||||||
config += "archive_url = '%s'\n" % (repo_base + '/archive')
|
'archive_url': repo_base + '/archive',
|
||||||
config += (
|
'archive_description': 'Old nightly builds that have been archived.',
|
||||||
"archive_description = 'Old nightly builds that have been archived.'\n"
|
'archive_older': options.archive_older,
|
||||||
)
|
'servergitmirrors': servergitmirror,
|
||||||
config += "archive_older = %i\n" % options.archive_older
|
'keystore': KEYSTORE_FILE,
|
||||||
config += "servergitmirrors = '%s'\n" % servergitmirror
|
'repo_keyalias': KEY_ALIAS,
|
||||||
config += "keystore = '%s'\n" % KEYSTORE_FILE
|
'keystorepass': PASSWORD,
|
||||||
config += "repo_keyalias = '%s'\n" % KEY_ALIAS
|
'keypass': PASSWORD,
|
||||||
config += "keystorepass = '%s'\n" % PASSWORD
|
'keydname': DISTINGUISHED_NAME,
|
||||||
config += "keypass = '%s'\n" % PASSWORD
|
'make_current_version_link': False,
|
||||||
config += "keydname = '%s'\n" % DISTINGUISHED_NAME
|
'update_stats': True,
|
||||||
config += "make_current_version_link = False\n"
|
}
|
||||||
config += "update_stats = True\n"
|
with open('config.yml', 'w') as fp:
|
||||||
with open('config.py', 'w') as fp:
|
yaml.dump(config, fp, default_flow_style=False)
|
||||||
fp.write(config)
|
os.chmod('config.yml', 0o600)
|
||||||
os.chmod('config.py', 0o600)
|
|
||||||
config = common.read_config(options)
|
config = common.read_config(options)
|
||||||
common.assert_config_keystore(config)
|
common.assert_config_keystore(config)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue