mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-12 10:10:30 +03:00
Merge branch 'nightly-stats' into 'master'
Add stats support to nightly repo See merge request fdroid/fdroidserver!722
This commit is contained in:
commit
5e0c8d5a46
1 changed files with 5 additions and 1 deletions
|
|
@ -170,6 +170,7 @@ def main():
|
||||||
git_mirror_path = os.path.join(repo_basedir, 'git-mirror')
|
git_mirror_path = os.path.join(repo_basedir, 'git-mirror')
|
||||||
git_mirror_repodir = os.path.join(git_mirror_path, 'fdroid', 'repo')
|
git_mirror_repodir = os.path.join(git_mirror_path, 'fdroid', 'repo')
|
||||||
git_mirror_metadatadir = os.path.join(git_mirror_path, 'fdroid', 'metadata')
|
git_mirror_metadatadir = os.path.join(git_mirror_path, 'fdroid', 'metadata')
|
||||||
|
git_mirror_statsdir = os.path.join(git_mirror_path, 'fdroid', 'stats')
|
||||||
if not os.path.isdir(git_mirror_repodir):
|
if not os.path.isdir(git_mirror_repodir):
|
||||||
logging.debug(_('cloning {url}').format(url=clone_url))
|
logging.debug(_('cloning {url}').format(url=clone_url))
|
||||||
try:
|
try:
|
||||||
|
|
@ -217,6 +218,8 @@ Last updated: {date}'''.format(repo_git_base=repo_git_base,
|
||||||
common.local_rsync(options, git_mirror_repodir + '/', 'repo/')
|
common.local_rsync(options, git_mirror_repodir + '/', 'repo/')
|
||||||
if os.path.isdir(git_mirror_metadatadir):
|
if os.path.isdir(git_mirror_metadatadir):
|
||||||
common.local_rsync(options, git_mirror_metadatadir + '/', 'metadata/')
|
common.local_rsync(options, git_mirror_metadatadir + '/', 'metadata/')
|
||||||
|
if os.path.isdir(git_mirror_statsdir):
|
||||||
|
common.local_rsync(options, git_mirror_statsdir + '/', 'stats/')
|
||||||
|
|
||||||
ssh_private_key_file = _ssh_key_from_debug_keystore()
|
ssh_private_key_file = _ssh_key_from_debug_keystore()
|
||||||
# this is needed for GitPython to find the SSH key
|
# this is needed for GitPython to find the SSH key
|
||||||
|
|
@ -246,7 +249,7 @@ Last updated: {date}'''.format(repo_git_base=repo_git_base,
|
||||||
config += "keydname = '%s'\n" % DISTINGUISHED_NAME
|
config += "keydname = '%s'\n" % DISTINGUISHED_NAME
|
||||||
config += "make_current_version_link = False\n"
|
config += "make_current_version_link = False\n"
|
||||||
config += "accepted_formats = ('txt', 'yml')\n"
|
config += "accepted_formats = ('txt', 'yml')\n"
|
||||||
# TODO add update_stats = True
|
config += "update_stats = True\n"
|
||||||
with open('config.py', 'w') as fp:
|
with open('config.py', 'w') as fp:
|
||||||
fp.write(config)
|
fp.write(config)
|
||||||
os.chmod('config.py', 0o600)
|
os.chmod('config.py', 0o600)
|
||||||
|
|
@ -293,6 +296,7 @@ Last updated: {date}'''.format(repo_git_base=repo_git_base,
|
||||||
subprocess.check_call(['fdroid', 'update', '--rename-apks', '--create-metadata', '--verbose'],
|
subprocess.check_call(['fdroid', 'update', '--rename-apks', '--create-metadata', '--verbose'],
|
||||||
cwd=repo_basedir)
|
cwd=repo_basedir)
|
||||||
common.local_rsync(options, repo_basedir + '/metadata/', git_mirror_metadatadir + '/')
|
common.local_rsync(options, repo_basedir + '/metadata/', git_mirror_metadatadir + '/')
|
||||||
|
common.local_rsync(options, repo_basedir + '/stats/', git_mirror_statsdir + '/')
|
||||||
mirror_git_repo.git.add(all=True)
|
mirror_git_repo.git.add(all=True)
|
||||||
mirror_git_repo.index.commit("update app metadata")
|
mirror_git_repo.index.commit("update app metadata")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue