Skip to content
Snippets Groups Projects
Commit a9f503f3 authored by René Schöne's avatar René Schöne
Browse files

Support case of non-existent Version.properties file.

parent 79561b3a
No related branches found
No related tags found
1 merge request!7Resolve "Create script to include commit in version string"
Pipeline #5097 failed
...@@ -119,10 +119,14 @@ task updateVersion { ...@@ -119,10 +119,14 @@ task updateVersion {
doLast { doLast {
def oldProps = new Properties() def oldProps = new Properties()
file(versionFile).withInputStream { stream -> oldProps.load(stream) } String oldFullVersion, fullVersion
def oldFullVersion = oldProps['version']
String fullVersion try {
file(versionFile).withInputStream { stream -> oldProps.load(stream) }
oldFullVersion = oldProps['version']
} catch (ignored) {
oldFullVersion = "???"
}
try { try {
def proc = 'git describe'.execute(null, rootDir) def proc = 'git describe'.execute(null, rootDir)
if (proc.waitFor() == 0) { if (proc.waitFor() == 0) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment