From 99b1528dccef116f5d3ef44ba68da9a5102f4680 Mon Sep 17 00:00:00 2001 From: Jonas Herzig Date: Sun, 22 Nov 2020 16:18:22 +0100 Subject: [PATCH] Update doRelease task for current branching model --- build.gradle.kts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 184e5ed3..0193959a 100755 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -144,13 +144,19 @@ val doRelease by tasks.registering { listOf(version, null) } - // Create new commit + // Merge release branch into stable but do not yet commit (we need to update the version.txt first) + command("git", "checkout", "stable") + command("git", "merge", "--no-ff", "--no-commit", "release-$version") + + // Update version.txt + file("version.txt").writeText("$version\n") + command("git", "add", "version.txt") + + // Finallize the merge. The message is what is later used to identify releses for building the version.json tree val commitMessage = if (preVersion != null) "Pre-release $preVersion of $modVersion" else "Release $modVersion" - file("version.txt").writeText("$version\n") - command("git", "add", "version.txt") command("git", "commit", "-m", commitMessage) // Generate versions.json content