projects
/
platform
/
upstream
/
SPIRV-Tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9dd1cd7
)
Fix the corner case in version generation script.
author
Lei Zhang
<antiagainst@google.com>
Fri, 11 Mar 2016 20:03:04 +0000
(15:03 -0500)
committer
Lei Zhang
<antiagainst@google.com>
Fri, 11 Mar 2016 20:06:15 +0000
(15:06 -0500)
When the given directory is not inside the SPIRV-Tools project,
describe() returns a str instance instead of bytes instance
in Python3, which will case problem when calling decode() on it.
utils/update_build_version.py
patch
|
blob
|
history
diff --git
a/utils/update_build_version.py
b/utils/update_build_version.py
index
16232f8
..
69b4289
100755
(executable)
--- a/
utils/update_build_version.py
+++ b/
utils/update_build_version.py
@@
-62,7
+62,8
@@
def describe(dir):
try:
return command_output(['git', 'rev-parse', 'HEAD'], dir).rstrip()
except:
- return 'unknown hash, ' + datetime.date.today().isoformat()
+ return 'unknown hash, {}'.format(
+ datetime.date.today().isoformat()).encode('ascii')
def main():