From 84ba9b19be1083eaa9a054e29591843e07e5e7dc Mon Sep 17 00:00:00 2001 From: Ciaran Gultnieks Date: Wed, 2 Mar 2011 21:47:48 +0000 Subject: [PATCH] Added the ability to flag an unbuildable release --- README | 6 ++++++ build.py | 7 +++++-- update.py | 9 +++++++++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/README b/README index 0cb51aa3..4dc9f585 100644 --- a/README +++ b/README @@ -120,6 +120,12 @@ The above specifies to build version 0.12, which has a version code of 3. The third parameter specifies the tag, commit or revision number from which to build it in the source repository. +If the commit version starts with a !, that version is not built. Instead, +everything after the ! is used as a reason why it can't be built. The +purpose of this feature is to allow non-buildable releases (e.g. the source +is not published) to be flagged, so the scripts don't generate repeated +messages about them. (And also to record the information for review later). + In addition to the three, always required, parameters described above, further parameters can be added (in name=value format) to apply further configuration to the build. These are: diff --git a/build.py b/build.py index 16add9bf..9adcad86 100755 --- a/build.py +++ b/build.py @@ -76,9 +76,12 @@ for app in apps: dest_unsigned = dest + "_unsigned" if os.path.exists(dest): - print "Version " + thisbuild['version'] + " already exists" + print "..version " + thisbuild['version'] + " already exists" + elif thisbuild['commit'].startswith('!'): + print ("..skipping version " + thisbuild['version'] + " - " + + thisbuild['commit'][1:]) else: - print "Building version " + thisbuild['version'] + print "..building version " + thisbuild['version'] if not got_source: diff --git a/update.py b/update.py index f88c33b4..d317e42a 100755 --- a/update.py +++ b/update.py @@ -337,6 +337,15 @@ for app in apps: + ") " + app['source']) warnings += 1 + # If we don't have the market version, check if there is a build + # with a commit ID starting with '!' - this means we can't build it + # for some reason, and don't want hassling about it... + if not gotmarketver and app['marketvercode'] != '0': + for build in app['builds']: + if build['vercode'] == app['marketvercode']: + gotmarketver = True + + # Output a message of harassment if we don't have the market version: if not gotmarketver and app['marketvercode'] != '0': if app['usebuilt']: addr = app['source']