patch limit

main
Brett 2024-03-07 12:01:23 -05:00
parent 0b133d01ad
commit 17a516fb2f
1 changed files with 3 additions and 0 deletions

View File

@ -8,6 +8,7 @@ import subprocess
VERSION_BEGIN_STR = "set(BLT_VERSION " VERSION_BEGIN_STR = "set(BLT_VERSION "
VERSION_END_STR = ")" VERSION_END_STR = ")"
PATCH_LIMIT = 1000
#--------------------------------------- #---------------------------------------
# DO NOT TOUCH # DO NOT TOUCH
@ -56,6 +57,8 @@ def inc_minor(cmake_text):
def inc_patch(cmake_text): def inc_patch(cmake_text):
version_parts, begin, end = split_version(cmake_text) version_parts, begin, end = split_version(cmake_text)
if int(version_parts[2]) + 1 >= PATCH_LIMIT:
return inc_minor(cmake_text)
version_parts[2] = str(int(version_parts[2]) + 1) version_parts[2] = str(int(version_parts[2]) + 1)
return recombine(cmake_text, version_parts, begin, end) return recombine(cmake_text, version_parts, begin, end)