Introduce disable= as a better way of disabling a build

Prefixing commit ID with ! and a message will still work, but that's
very silly. Using disable= is now the correct way.
This commit is contained in:
Ciaran Gultnieks 2013-10-26 10:26:47 +01:00
parent 2aafda0154
commit 715035a707
4 changed files with 17 additions and 15 deletions

View file

@ -681,7 +681,7 @@ def trybuild(app, thisbuild, build_dir, output_dir, also_check_dir, srclib_dir,
if os.path.exists(dest_also):
return False
if thisbuild['commit'].startswith('!'):
if thisbuild['commit'].startswith('!') or 'disable' in thisbuild:
return False
print "Building version " + thisbuild['version'] + ' of ' + app['id']

View file

@ -86,9 +86,9 @@ def main():
for thisbuild in app['builds']:
if thisbuild['commit'].startswith('!'):
if thisbuild['commit'].startswith('!') or 'disable' in thisbuild:
print ("..skipping version " + thisbuild['version'] + " - " +
thisbuild['commit'][1:])
thisbuild.get('disable', thisbuild['commit'][1:]))
else:
print "..scanning version " + thisbuild['version']

View file

@ -88,14 +88,14 @@ def update_wiki(apps, apks, verbose=False):
apklist.append(apk)
# Include ones we can't build, as a special case...
for thisbuild in app['builds']:
if thisbuild['commit'].startswith('!'):
if thisbuild['commit'].startswith('!') or 'disable' in thisbuild:
if thisbuild['vercode'] == app['Current Version Code']:
cantupdate = True
apklist.append({
#TODO: Nasty: vercode is a string in the build, and an int elsewhere
'versioncode': int(thisbuild['vercode']),
'version': thisbuild['version'],
'buildproblem': thisbuild['commit'][1:]
'buildproblem': thisbuild.get('disable', thisbuild['commit'][1:])
})
else:
builtit = False
@ -232,7 +232,7 @@ def delete_disabled_builds(apps, apkcache, repodirs):
"""
for app in apps:
for build in app['builds']:
if build['commit'].startswith('!'):
if build['commit'].startswith('!') or 'disable' in build:
apkfilename = app['id'] + '_' + str(build['vercode']) + '.apk'
for repodir in repodirs:
apkpath = os.path.join(repodir, apkfilename)