diff options
author | Ari Hausman-Cohen <arihc@google.com> | 2015-10-28 17:53:35 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-10-28 17:53:35 +0000 |
commit | f5872349d6a43e0cf2b3fbed2eff7a62517fb940 (patch) | |
tree | 17e8af878a5140c6539b7d182130d562779a0f81 | |
parent | a3d779451a9c739e3fa4d62c00c396bfc2dedc68 (diff) | |
parent | 7b4e1cdd2ffb49cd0da23f493cd1539e56163cc7 (diff) | |
download | bdk-f5872349d6a43e0cf2b3fbed2eff7a62517fb940.tar.gz |
Merge "Updated version support." into mnc-brillo-dev
-rw-r--r-- | brunch/lib/commands/root/version.py | 3 | ||||
-rw-r--r-- | brunch/lib/core/product.py | 4 | ||||
-rw-r--r-- | brunch/lib/core/util.py | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/brunch/lib/commands/root/version.py b/brunch/lib/commands/root/version.py index 8c22a87..40f191a 100644 --- a/brunch/lib/commands/root/version.py +++ b/brunch/lib/commands/root/version.py @@ -17,10 +17,11 @@ """Prints version info""" from cli import clicommand +from core import util class Version(clicommand.Command): """Print version info""" def Run(self, args): - print "Preview BDK 0.1" + print util.GetBDKVersion() return 0 diff --git a/brunch/lib/core/product.py b/brunch/lib/core/product.py index 9dafdeb..7fa9f4d 100644 --- a/brunch/lib/core/product.py +++ b/brunch/lib/core/product.py @@ -134,8 +134,8 @@ class Environment(object): bdk_version = util.GetBDKVersion() bdk_warning = '' # TODO(wad) implement this. - if self._config.bdk_version < bdk_version: - bdk_warning = 'BDK versions differ. Run envupdate to update.' + if self._config.bdk_version != bdk_version: + bdk_warning = 'BDK versions differ.' return product_templates.BDK_BANNER.substitute( self._config.dict(), bdk_version=bdk_version, diff --git a/brunch/lib/core/util.py b/brunch/lib/core/util.py index d234d3b..7b7bb93 100644 --- a/brunch/lib/core/util.py +++ b/brunch/lib/core/util.py @@ -61,7 +61,7 @@ def GetBDKVersion(): '..', '..', '..', 'VERSION')) version = 0 # Default version. with open(version_path, 'r') as f: - version = int(f.readline()) + version = f.readline().strip() vars()['bdk_version'] = version return version |