From 36ecc2eb41951e56f05b1f4954a46aa7e2db48b9 Mon Sep 17 00:00:00 2001 From: Jeremy Klein Date: Thu, 25 Jan 2024 16:12:06 -0800 Subject: [PATCH] Add a no-commit arg to the version update script --- build.gradle.kts | 3 +++ scripts/versions.main.kts | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 793eeaa..34ec796 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -49,6 +49,9 @@ subprojects { if (project.hasProperty("newVersion")) { cmd.addAll(listOf("-v", project.properties["newVersion"].toString())) } + if (project.hasProperty("noCommit")) { + cmd.add("--no-commit") + } commandLine(*cmd.toTypedArray()) } diff --git a/scripts/versions.main.kts b/scripts/versions.main.kts index 4ef007a..1fd5a5f 100755 --- a/scripts/versions.main.kts +++ b/scripts/versions.main.kts @@ -49,8 +49,10 @@ while (!force) { setCurrentVersion(tagVersion) setVersionInDocs(tagVersion, projectName) - -runCommand("git", "commit", "-a", "-m", "Bump $projectName to version $tagVersion") +val noCommit = args.contains("--no-commit") +if (!noCommit) { + runCommand("git", "commit", "-a", "-m", "Bump $projectName to version $tagVersion") +} if (tagAndSnapshot) { runCommand("git", "tag", "$projectName-v$tagVersion")