Skip to content

Commit

Permalink
Add a no-commit arg to the version update script (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
jklein24 authored Jan 26, 2024
2 parents fcdd4d5 + 36ecc2e commit 23b3447
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}

Expand Down
6 changes: 4 additions & 2 deletions scripts/versions.main.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down

0 comments on commit 23b3447

Please sign in to comment.