From a20602f67191a5cbd540015e555572ed2e0fba4f Mon Sep 17 00:00:00 2001 From: "Michael N. Lipp" Date: Sat, 1 Jun 2024 11:54:23 +0200 Subject: [PATCH 1/6] Plain tags for development branches. --- .../src/org.jdrupes.vmoperator.versioning-conventions.gradle | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/buildSrc/src/org.jdrupes.vmoperator.versioning-conventions.gradle b/buildSrc/src/org.jdrupes.vmoperator.versioning-conventions.gradle index 114db51..8623857 100644 --- a/buildSrc/src/org.jdrupes.vmoperator.versioning-conventions.gradle +++ b/buildSrc/src/org.jdrupes.vmoperator.versioning-conventions.gradle @@ -21,7 +21,8 @@ scmVersion { } var p = shortened.replace('.', '-') + "-" if (grgit.branch.current.name != "main" - && !grgit.branch.current.name.startsWith("release")) { + && !grgit.branch.current.name.startsWith("release") + && !grgit.branch.current.name.startsWith("develop")) { p = p + grgit.branch.current.name.replace('/', '-') + "-" } prefix = p From 837ee043aaf9f813057946a0fb4ecea2027c5cbd Mon Sep 17 00:00:00 2001 From: "Michael N. Lipp" Date: Sat, 1 Jun 2024 12:28:28 +0200 Subject: [PATCH 2/6] Checkout triggering version (is default). --- .github/workflows/release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3e6b3c9..3c59936 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,6 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 - ref: main - name: Install graphviz run: sudo apt-get install graphviz - name: Install podman From 2cb8c90357b6a52218e5e4e6fce5fe7c3989406c Mon Sep 17 00:00:00 2001 From: "Michael N. Lipp" Date: Sat, 1 Jun 2024 13:26:47 +0200 Subject: [PATCH 3/6] Try to fix version issue when building release. --- .../org.jdrupes.vmoperator.java-common-conventions.gradle | 8 +++++--- .../org.jdrupes.vmoperator.versioning-conventions.gradle | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/buildSrc/src/org.jdrupes.vmoperator.java-common-conventions.gradle b/buildSrc/src/org.jdrupes.vmoperator.java-common-conventions.gradle index e09814c..5185041 100644 --- a/buildSrc/src/org.jdrupes.vmoperator.java-common-conventions.gradle +++ b/buildSrc/src/org.jdrupes.vmoperator.java-common-conventions.gradle @@ -5,6 +5,11 @@ */ plugins { + // Apply the common versioning conventions. + // Put this at the start, because accessing project.version before + // this is applied makes things fail. + id 'org.jdrupes.vmoperator.versioning-conventions' + // Apply the java Plugin to add support for Java. id 'java' @@ -13,9 +18,6 @@ plugins { // Access to git information id 'org.ajoberstar.grgit' - - // Apply the common versioning conventions. - id 'org.jdrupes.vmoperator.versioning-conventions' } repositories { diff --git a/buildSrc/src/org.jdrupes.vmoperator.versioning-conventions.gradle b/buildSrc/src/org.jdrupes.vmoperator.versioning-conventions.gradle index 8623857..8993929 100644 --- a/buildSrc/src/org.jdrupes.vmoperator.versioning-conventions.gradle +++ b/buildSrc/src/org.jdrupes.vmoperator.versioning-conventions.gradle @@ -28,5 +28,5 @@ scmVersion { prefix = p } } -version = scmVersion.version +project.version = scmVersion.version ext.isSnapshot = version.endsWith('-SNAPSHOT') From c66e304de444970f390841d2731760d72903bf8c Mon Sep 17 00:00:00 2001 From: "Michael N. Lipp" Date: Sat, 1 Jun 2024 13:44:53 +0200 Subject: [PATCH 4/6] Fetch all tags to make axion release plugin work properly. --- .github/workflows/release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3c59936..19f5323 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,9 +18,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 + fetch-tags: true - name: Install graphviz run: sudo apt-get install graphviz - name: Install podman From 2403f5db645e9a63f4852fb149145edb78f9922c Mon Sep 17 00:00:00 2001 From: "Michael N. Lipp" Date: Sat, 1 Jun 2024 13:57:21 +0200 Subject: [PATCH 5/6] Undo previous commit (is implied by fetch-depth: 0). --- .github/workflows/release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 19f5323..e99ee03 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,6 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - fetch-tags: true - name: Install graphviz run: sudo apt-get install graphviz - name: Install podman From 6c250d46561537be61c5a4e243e84e19525b833b Mon Sep 17 00:00:00 2001 From: "Michael N. Lipp" Date: Sat, 1 Jun 2024 14:28:57 +0200 Subject: [PATCH 6/6] Fix release versions. --- .../src/org.jdrupes.vmoperator.versioning-conventions.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/buildSrc/src/org.jdrupes.vmoperator.versioning-conventions.gradle b/buildSrc/src/org.jdrupes.vmoperator.versioning-conventions.gradle index 8993929..40ced48 100644 --- a/buildSrc/src/org.jdrupes.vmoperator.versioning-conventions.gradle +++ b/buildSrc/src/org.jdrupes.vmoperator.versioning-conventions.gradle @@ -21,6 +21,7 @@ scmVersion { } var p = shortened.replace('.', '-') + "-" if (grgit.branch.current.name != "main" + && grgit.branch.current.name != "HEAD" && !grgit.branch.current.name.startsWith("release") && !grgit.branch.current.name.startsWith("develop")) { p = p + grgit.branch.current.name.replace('/', '-') + "-"