From 1da0212d19dafe8eb2cb53461883df7bf4b594ca Mon Sep 17 00:00:00 2001 From: Marcin Mielnicki Date: Tue, 28 Mar 2023 21:35:18 +0200 Subject: [PATCH 1/3] Add axion-release plugin --- build.gradle.kts | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 3ab454c..1132b78 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,3 +1,5 @@ +import pl.allegro.tech.build.axion.release.domain.hooks.HookContext + plugins { id("org.jetbrains.kotlin.jvm") version "1.8.10" `java-gradle-plugin` @@ -8,10 +10,29 @@ plugins { id("com.github.jakemarsden.git-hooks") version "0.0.2" id("io.github.platan.tests-execution-chart") version "0.3.0" kotlin("plugin.serialization") version "1.8.10" + id("pl.allegro.tech.build.axion-release") version "1.15.0" } group = "io.github.platan" -version = "0.3.1-SNAPSHOT" + +scmVersion { + tag { + prefix.set("release-") + } + hooks { + pre( + "fileUpdate", + mapOf( + "file" to "README.md", + "pattern" to KotlinClosure2({ previousVersion, _ -> "version $previousVersion" }), + "replacement" to KotlinClosure2({ releaseVersion, _ -> "version $releaseVersion" }), + ), + ) +// pre("commit") + } +} + +project.version = scmVersion.version repositories { mavenCentral() From 204b6018664d9ab1b2cbcc608adbdc7a1ed9b2fd Mon Sep 17 00:00:00 2001 From: Marcin Mielnicki Date: Tue, 28 Mar 2023 21:38:13 +0200 Subject: [PATCH 2/3] Add axion-release plugin --- build.gradle.kts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 1132b78..d4c50fc 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -24,8 +24,8 @@ scmVersion { "fileUpdate", mapOf( "file" to "README.md", - "pattern" to KotlinClosure2({ previousVersion, _ -> "version $previousVersion" }), - "replacement" to KotlinClosure2({ releaseVersion, _ -> "version $releaseVersion" }), + "pattern" to KotlinClosure2({ previousVersion, _ -> "version \"$previousVersion\"" }), + "replacement" to KotlinClosure2({ releaseVersion, _ -> "version \"$releaseVersion\"" }), ), ) // pre("commit") From 3fbbafb6de6d42ca187c19f47f6dbf3bbfce8587 Mon Sep 17 00:00:00 2001 From: Marcin Mielnicki Date: Tue, 28 Mar 2023 21:41:24 +0200 Subject: [PATCH 3/3] Add axion-release plugin --- build.gradle.kts | 1 - 1 file changed, 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index d4c50fc..3fcf0db 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -28,7 +28,6 @@ scmVersion { "replacement" to KotlinClosure2({ releaseVersion, _ -> "version \"$releaseVersion\"" }), ), ) -// pre("commit") } }