Skip to content

Commit

Permalink
Fix broken versioning of nodehost builds
Browse files Browse the repository at this point in the history
  • Loading branch information
scroix committed Apr 24, 2024
1 parent cb8d2a6 commit 15b6416
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 5 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down
4 changes: 1 addition & 3 deletions nodel-framework/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down
2 changes: 1 addition & 1 deletion nodel-webui-js/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 15b6416

Please sign in to comment.