py/makeversionhdr.py: Always add micro to version string even if it's 0.

Moving forward, tags in this repository will always have three components.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George 2023-03-10 18:39:14 +11:00
parent 4376c969f6
commit 668a7bd28a
1 changed files with 1 additions and 3 deletions

View File

@ -78,9 +78,7 @@ def get_version_info_from_mpconfig(repo_path):
ver_minor = int(line.strip().split()[2])
elif line.startswith("#define MICROPY_VERSION_MICRO "):
ver_micro = int(line.strip().split()[2])
git_tag = "v%d.%d" % (ver_major, ver_minor)
if ver_micro != 0:
git_tag += ".%d" % (ver_micro,)
git_tag = "v%d.%d.%d" % (ver_major, ver_minor, ver_micro)
return git_tag, "<no hash>"
return None