From 79ba2835f675eb29d9ff0841605c38667d1112f6 Mon Sep 17 00:00:00 2001 From: thewavelength Date: Sun, 10 Sep 2017 02:17:35 +0200 Subject: [PATCH] Fix build when product.version is mangled (#679) Strip line breaks when reading product.version, as Git can mangle the line breaks if autocrlf is configured, resulting in `SM_BUILD_TAG` getting defined with a linebreak. --- tools/buildbot/generate_headers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/buildbot/generate_headers.py b/tools/buildbot/generate_headers.py index d904ba0a..c2d34944 100644 --- a/tools/buildbot/generate_headers.py +++ b/tools/buildbot/generate_headers.py @@ -50,7 +50,7 @@ def output_version_headers(): count, shorthash, longhash = get_git_version() with open(os.path.join(SourceFolder, 'product.version')) as fp: - contents = fp.read() + contents = fp.read().strip() m = re.match('(\d+)\.(\d+)\.(\d+)-?(.*)', contents) if m == None: raise Exception('Could not detremine product version')