From d738923c4ea5822e9fd5aeeb7832cf5d55a6f9f9 Mon Sep 17 00:00:00 2001 From: Brett Laptop Date: Fri, 27 Sep 2024 13:12:55 -0400 Subject: [PATCH] nobranch --- commit.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/commit.py b/commit.py index e712cf7..4fe0c77 100755 --- a/commit.py +++ b/commit.py @@ -39,7 +39,7 @@ class Config: self.branch_on_major = True self.branch_on_minor = False self.release_on_major = True - self.release_on_minor = False + self.release_on_minor = True self.main_branch = "main" self.patch_limit = -1 @@ -213,7 +213,9 @@ def main(): parser.add_argument("-M", "--major", action='store_true', default=False, required=False) parser.add_argument('-e', "--env", help="environment file", required=False, default=None) parser.add_argument('-c', "--config", help="config file", required=False, default=None) - parser.add_argument("--create_default_config", action="store_true", default=False, required=False) + parser.add_argument("--create-default-config", action="store_true", default=False, required=False) + parser.add_argument("--no-release", action="store_true", default=False, required=False) + parser.add_argument("--no-branch", action="store_true", default=False, required=False) args = parser.parse_args() @@ -266,19 +268,19 @@ def main(): cmake_text = load_cmake() version_parts = split_version(cmake_text)[0] - if args.major: + if not args.no_branch and args.major: if config.branch_on_major: make_branch(config, "v" + str(version_parts[0])) - if args.minor: + if not args.no_branch and args.minor: if config.branch_on_minor: make_branch(config, "v" + str(version_parts[0]) + "." + str(version_parts[1])) subprocess.call(["sh", "-c", "git remote | xargs -L1 git push --all"]) - if args.major: + if not args.no_release and args.major: if config.release_on_major: make_release(env, "v" + str(version_parts[0])) - if args.minor: + if not args.no_release and args.minor: if config.release_on_minor: make_release(env, "v" + str(version_parts[0]) + "." + str(version_parts[1]))