mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-09-19 03:30:12 +02:00
Merge branch 'master' of gitorious.org:f-droid/fdroidserver
This commit is contained in:
commit
dfa95316a0
@ -96,21 +96,32 @@ def check_tags(app, sdk_path):
|
|||||||
# caution, because it's inappropriate for many projects.
|
# caution, because it's inappropriate for many projects.
|
||||||
# Returns (None, "a message") if this didn't work, or (version, vercode) for
|
# Returns (None, "a message") if this didn't work, or (version, vercode) for
|
||||||
# the details of the current version.
|
# the details of the current version.
|
||||||
def check_repomanifest(app, sdk_path, branch="master"):
|
def check_repomanifest(app, sdk_path, branch=None):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
||||||
build_dir = 'build/' + app['id']
|
build_dir = 'build/' + app['id']
|
||||||
|
|
||||||
if app['Repo Type'] not in ('git', 'git-svn'):
|
if app['Repo Type'] == 'bzr':
|
||||||
return (None, 'RepoManifest update mode only works for git and git-svn repositories currently')
|
return (None, 'RepoManifest update mode has not been ported to bzr repositories yet')
|
||||||
|
|
||||||
# Set up vcs interface and make sure we have the latest code...
|
# Set up vcs interface and make sure we have the latest code...
|
||||||
vcs = common.getvcs(app['Repo Type'], app['Repo'], build_dir, sdk_path)
|
vcs = common.getvcs(app['Repo Type'], app['Repo'], build_dir, sdk_path)
|
||||||
if app['Repo Type'] == 'git':
|
if app['Repo Type'] == 'git':
|
||||||
|
if branch:
|
||||||
vcs.gotorevision('origin/'+branch)
|
vcs.gotorevision('origin/'+branch)
|
||||||
|
else:
|
||||||
|
vcs.gotorevision('origin/master')
|
||||||
|
pass
|
||||||
elif app['Repo Type'] == 'git-svn':
|
elif app['Repo Type'] == 'git-svn':
|
||||||
vcs.gotorevision('trunk')
|
vcs.gotorevision('trunk')
|
||||||
|
elif app['Repo Type'] == 'svn':
|
||||||
|
pass
|
||||||
|
elif app['Repo Type'] == 'hg':
|
||||||
|
if branch:
|
||||||
|
vcs.gotorevision(branch)
|
||||||
|
else:
|
||||||
|
vcs.gotorevision('default')
|
||||||
|
|
||||||
if len(app['builds']) == 0:
|
if len(app['builds']) == 0:
|
||||||
return (None, "Can't use RepoManifest with no builds defined")
|
return (None, "Can't use RepoManifest with no builds defined")
|
||||||
|
@ -159,6 +159,19 @@ def main():
|
|||||||
f.write(rtype + ' ' + str(count) + '\n')
|
f.write(rtype + ' ' + str(count) + '\n')
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
|
# Calculate and write stats for update check modes...
|
||||||
|
ucms = {}
|
||||||
|
for app in metaapps:
|
||||||
|
checkmode = app['Update Check Mode']
|
||||||
|
if checkmode in ucms:
|
||||||
|
ucms[checkmode] += 1;
|
||||||
|
else:
|
||||||
|
ucms[checkmode] = 1
|
||||||
|
f = open('stats/update_check_modes.txt', 'w')
|
||||||
|
for checkmode, count in ucms.iteritems():
|
||||||
|
f.write(checkmode + ' ' + str(count) + '\n')
|
||||||
|
f.close()
|
||||||
|
|
||||||
# Calculate and write stats for licenses...
|
# Calculate and write stats for licenses...
|
||||||
licenses = {}
|
licenses = {}
|
||||||
for app in metaapps:
|
for app in metaapps:
|
||||||
|
Loading…
Reference in New Issue
Block a user