mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2025-02-21 14:54:14 +01:00
Fix ambuild script error when using branch name with utf-8 chars
This commit is contained in:
parent
d62379244c
commit
2e43b26539
@ -16,7 +16,7 @@ outputs = [
|
|||||||
os.path.join(builder.buildFolder, 'includes', 'metamod_version_auto.h')
|
os.path.join(builder.buildFolder, 'includes', 'metamod_version_auto.h')
|
||||||
]
|
]
|
||||||
|
|
||||||
with open(os.path.join(builder.sourcePath, '.git', 'HEAD')) as fp:
|
with open(os.path.join(builder.sourcePath, '.git', 'HEAD'), encoding='utf-8') as fp:
|
||||||
head_contents = fp.read().strip()
|
head_contents = fp.read().strip()
|
||||||
if re.search('^[a-fA-F0-9]{40}$', head_contents):
|
if re.search('^[a-fA-F0-9]{40}$', head_contents):
|
||||||
git_head_path = os.path.join(builder.sourcePath, '.git', 'HEAD')
|
git_head_path = os.path.join(builder.sourcePath, '.git', 'HEAD')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user