From fcf3daf6d8ae9780a1227c3fbfa49cc2c91dbde4 Mon Sep 17 00:00:00 2001 From: "Dmitry.Tretyakov" Date: Fri, 28 Oct 2016 16:03:45 +0300 Subject: [PATCH] Log version number --- build.gradle | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 09daa0edf..890e68a7d 100644 --- a/build.gradle +++ b/build.gradle @@ -12,13 +12,14 @@ buildscript { } ext { - def correctVersion = hasProperty('versionNumber') && property('versionNumber') ==~ /\d+\.\d+\.\d+.*/ + def correctVersion = project.hasProperty('versionNumber') && property('versionNumber') ==~ /\d+\.\d+\.\d+.*/ + println property('versionNumber') + ' is correct version: ' + correctVersion versionNumber = correctVersion ? property('versionNumber') : 'SNAPSHOT-' + new Date().format('yyyyMMddHHmmss') projectIds = ['group': 'teamcity-dotnet-plugin', 'version': versionNumber, 'artifact': 'dotnet-core-plugin'] - teamcityVersion = hasProperty('teamcityVersion') ? property('teamcityVersion') : '9.0' + teamcityVersion = project.hasProperty('teamcityVersion') ? property('teamcityVersion') : '9.0' - teamcityDir = hasProperty('teamcityDir') ? property('teamcityDir') : "$rootDir/servers/TeamCity-${teamcityVersion}" + teamcityDir = project.hasProperty('teamcityDir') ? property('teamcityDir') : "$rootDir/servers/TeamCity-${teamcityVersion}" teamcityDataDir = "$rootDir/data/" + (teamcityVersion =~ /(\d+\.\d+).*/)[0][1] teamcityJavaHome = System.properties['java.home']