mirror of
https://github.com/openharmony/third_party_unity.git
synced 2026-07-21 04:05:28 -04:00
9b846b9885
Signed-off-by: 黄国辉 <huangguohui6@huawei.com>
16 lines
303 B
Python
16 lines
303 B
Python
#!/usr/bin/env python3
|
|
import re
|
|
import sys
|
|
|
|
ver_re = re.compile(r"^#define\s+UNITY_VERSION_(?:MAJOR|MINOR|BUILD)\s+(\d+)$")
|
|
version = []
|
|
|
|
with open(sys.argv[1], "r") as f:
|
|
for line in f:
|
|
m = ver_re.match(line)
|
|
if m:
|
|
version.append(m.group(1))
|
|
|
|
print(".".join(version))
|
|
|