Compare commits

...

4 commits

Author SHA1 Message Date
c66e304de4 Fetch all tags to make axion release plugin work properly.
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
2024-06-01 13:44:53 +02:00
2cb8c90357 Try to fix version issue when building release.
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
2024-06-01 13:26:47 +02:00
837ee043aa Checkout triggering version (is default).
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
2024-06-01 12:28:28 +02:00
a20602f671 Plain tags for development branches.
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
2024-06-01 11:54:23 +02:00
3 changed files with 10 additions and 7 deletions

View file

@ -18,10 +18,10 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
ref: main fetch-tags: true
- name: Install graphviz - name: Install graphviz
run: sudo apt-get install graphviz run: sudo apt-get install graphviz
- name: Install podman - name: Install podman

View file

@ -5,6 +5,11 @@
*/ */
plugins { 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. // Apply the java Plugin to add support for Java.
id 'java' id 'java'
@ -13,9 +18,6 @@ plugins {
// Access to git information // Access to git information
id 'org.ajoberstar.grgit' id 'org.ajoberstar.grgit'
// Apply the common versioning conventions.
id 'org.jdrupes.vmoperator.versioning-conventions'
} }
repositories { repositories {

View file

@ -21,11 +21,12 @@ scmVersion {
} }
var p = shortened.replace('.', '-') + "-" var p = shortened.replace('.', '-') + "-"
if (grgit.branch.current.name != "main" 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('/', '-') + "-" p = p + grgit.branch.current.name.replace('/', '-') + "-"
} }
prefix = p prefix = p
} }
} }
version = scmVersion.version project.version = scmVersion.version
ext.isSnapshot = version.endsWith('-SNAPSHOT') ext.isSnapshot = version.endsWith('-SNAPSHOT')