| Index: native_client_sdk/src/tools/getos.py
|
| diff --git a/native_client_sdk/src/tools/getos.py b/native_client_sdk/src/tools/getos.py
|
| index 62c2b5b7632043f2f4f600404729792acf948036..f14e02e0630494da2158a9bbacab2275fda9a9d1 100755
|
| --- a/native_client_sdk/src/tools/getos.py
|
| +++ b/native_client_sdk/src/tools/getos.py
|
| @@ -68,6 +68,7 @@ def GetSDKVersion():
|
|
|
| version = None
|
| revision = None
|
| + commit_position = None
|
| for line in open(readme):
|
| if ':' in line:
|
| name, value = line.split(':', 1)
|
| @@ -75,8 +76,10 @@ def GetSDKVersion():
|
| version = value.strip()
|
| if name == "Chrome Revision":
|
| revision = value.strip()
|
| + if name == "Chrome Commit Position":
|
| + commit_position = value.strip()
|
|
|
| - if revision == None or version == None:
|
| + if revision is None or version is None or commit_position is None:
|
| raise Error("error parsing SDK README: %s" % readme)
|
|
|
| try:
|
| @@ -84,7 +87,7 @@ def GetSDKVersion():
|
| except ValueError:
|
| raise Error("error parsing SDK README: %s" % readme)
|
|
|
| - return (version, revision)
|
| + return (version, revision, commit_position)
|
|
|
|
|
| def GetSystemArch(platform):
|
| @@ -204,6 +207,8 @@ def main(args):
|
| help='Print major version of the NaCl SDK.')
|
| parser.add_option('--sdk-revision', action='store_true',
|
| help='Print revision number of the NaCl SDK.')
|
| + parser.add_option('--sdk-commit-position', action='store_true',
|
| + help='Print commit position of the NaCl SDK.')
|
| parser.add_option('--check-version',
|
| help='Check that the SDK version is at least as great as the '
|
| 'version passed in.')
|
| @@ -229,6 +234,8 @@ def main(args):
|
| out = GetSDKVersion()[0]
|
| elif options.sdk_revision:
|
| out = GetSDKVersion()[1]
|
| + elif options.sdk_commit_position:
|
| + out = GetSDKVersion()[2]
|
| elif options.check_version:
|
| required_version = ParseVersion(options.check_version)
|
| version = GetSDKVersion()
|
|
|