From 17a516fb2ff858e7f7e4efafca049edf07cf0cac Mon Sep 17 00:00:00 2001 From: Brett Laptop Date: Thu, 7 Mar 2024 12:01:23 -0500 Subject: [PATCH] patch limit --- commit.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/commit.py b/commit.py index dca8d9c..e8b8443 100755 --- a/commit.py +++ b/commit.py @@ -8,6 +8,7 @@ import subprocess VERSION_BEGIN_STR = "set(BLT_VERSION " VERSION_END_STR = ")" +PATCH_LIMIT = 1000 #--------------------------------------- # DO NOT TOUCH @@ -56,6 +57,8 @@ def inc_minor(cmake_text): def inc_patch(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) return recombine(cmake_text, version_parts, begin, end)