From 15b641654cb971901b35d9929f54c88c57351bcf Mon Sep 17 00:00:00 2001 From: scroix Date: Wed, 24 Apr 2024 20:38:13 +1000 Subject: [PATCH] Fix broken versioning of nodehost builds - https://github.com/museumsvictoria/nodel/pull/314#issuecomment-2071805006 --- build.gradle | 8 +++++--- nodel-framework/build.gradle | 4 +--- nodel-webui-js/build.gradle | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/build.gradle b/build.gradle index 4cbfdcde..35577133 100644 --- a/build.gradle +++ b/build.gradle @@ -27,18 +27,20 @@ ext { branch = gitInfo.branch if (branch == 'master') { - branch = 'dev' + branch = 'release' } else if (branch.contains('/')) { branch = branch.substring(branch.indexOf('/') + 1) } - version = gitInfo.branch != 'stable' ? "${project.version}-${branch}_r${rev}" : project.version + baseVersion = '2.2.1' + versionIdentifier = "${baseVersion}-${branch}_r${rev}" + println "versionIdentifier: ${versionIdentifier}" } subprojects { apply plugin: 'java' group = 'org.nodel' - version = '2.2.1' + version = rootProject.ext.baseVersion repositories { mavenCentral() } diff --git a/nodel-framework/build.gradle b/nodel-framework/build.gradle index f928bc3e..8e529b62 100644 --- a/nodel-framework/build.gradle +++ b/nodel-framework/build.gradle @@ -5,14 +5,12 @@ apply plugin: 'eclipse' // some extended unicode is used in SimpleName compileJava.options.encoding = 'utf-8' -version = rootProject.ext.gitInfo.branch != 'stable' ? "${project.version}-${rootProject.ext.branch}_r${rootProject.ext.rev}" : project.version - jar { from "$buildDir/output" archiveBaseName = 'nodel-framework' manifest { attributes 'Implementation-Title': 'Nodel framework for Java', - 'Implementation-Version': rootProject.ext.version + 'Implementation-Version': rootProject.ext.versionIdentifier } } diff --git a/nodel-webui-js/build.gradle b/nodel-webui-js/build.gradle index 86b893b6..4eaa7f8e 100644 --- a/nodel-webui-js/build.gradle +++ b/nodel-webui-js/build.gradle @@ -111,7 +111,7 @@ tasks.register('filterContentTemplates', Copy) { buildOrigin : rootProject.ext.gitInfo.origin.toString(), buildProject: project.name.toString(), buildBranch : rootProject.ext.branch.toString(), - buildVersion: rootProject.ext.version.toString(), + buildVersion: rootProject.ext.versionIdentifier.toString(), buildId : rootProject.ext.buildSummary.toString(), buildRev : rootProject.ext.rev.toString(), buildHost : rootProject.ext.hostname.toString(),