File tree Expand file tree Collapse file tree 2 files changed +6
-11
lines changed
Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -17,11 +17,11 @@ println("Version: $version")
1717fun computeVersion (): Any {
1818 val versionFile = file(" version.txt" )
1919 val gitVersion: groovy.lang.Closure <String > by extra
20- var version = if (versionFile.exists()) versionFile.readText().trim() else gitVersion()
21- if (! versionFile.exists() && " true" != project.findProperty(" ciBuild" )) {
22- version = " $version -SNAPSHOT"
20+ return if (versionFile.exists()) {
21+ versionFile.readText().trim()
22+ } else {
23+ gitVersion().let { if (it.endsWith(" -SNAPSHOT" )) it else " $it -SNAPSHOT" }.also { versionFile.writeText(it) }
2324 }
24- return version
2525}
2626
2727subprojects {
Original file line number Diff line number Diff line change 11#! /bin/sh
22
33set -e
4- cd " $( dirname " $0 " ) "
5-
64(
7- cd ..
8- ./modelix-version.sh # ensure the version.txt exists
9- ./gradlew publishToMavenLocal
5+ cd " $( dirname " $0 " ) "
6+ ./gradlew build
107)
11-
12- ./gradlew build
You can’t perform that action at this time.
0 commit comments