Mercurial > public > develkit
changeset 257:70b500eef001
fix hg dependency
author | smith@nwoca.org |
---|---|
date | Tue, 09 Oct 2018 21:08:29 +0100 |
parents | 91e05187fd79 |
children | 98a734a5287e |
files | init20.gradle |
diffstat | 1 files changed, 20 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/init20.gradle Wed Jun 06 23:15:28 2018 +0100 +++ b/init20.gradle Tue Oct 09 21:08:29 2018 +0100 @@ -5,8 +5,8 @@ buildscript { repositories { + maven { url 'http://repos.ssdt.nwoca.org/artifactory/ssdt-repo' } maven { url 'http://repos.ssdt.nwoca.org/artifactory/gradle-plugins' } - maven { url 'http://repos.ssdt.nwoca.org/artifactory/ssdt-repo' } } dependencies { classpath 'postgresql:postgresql:9.1-901.jdbc4' @@ -795,20 +795,26 @@ } private findSnapshotVersion() { - def repositoryUrl = System.getenv('bamboo_planRepository_repositoryUrl') - if (repositoryUrl) { - println "hg pull $repositoryUrl".execute().text + + try { + def repositoryUrl = System.getenv('bamboo_planRepository_repositoryUrl') + if (repositoryUrl) { + println "hg pull $repositoryUrl".execute().text + } + def versions = "hg branches --closed".execute().text.split('\n').findAll { + it.startsWith( 'release') || it.startsWith( 'hotfix') + }.collect { + it.replaceAll('\\s+',' ').split(' ')[0].split('/')[1] - 'v' + }.collect { + new Version(*it.split('\\.')*.toInteger()) + }.sort { v1, v2 -> v2 <=> v1 } + + return versions ? versions.first().nextSnapshot() : new Version().nextSnapshot() + + } catch (e) { + return new Version().nextSnapshot() } - def versions = "hg branches --closed".execute().text.split('\n').findAll { - it.startsWith( 'release') || it.startsWith( 'hotfix') - }.collect { - it.replaceAll('\\s+',' ').split(' ')[0].split('/')[1] - 'v' - }.collect { - new Version(*it.split('\\.')*.toInteger()) - }.sort { v1, v2 -> v2 <=> v1 } - - return versions ? versions.first().nextSnapshot() : new Version().nextSnapshot() - + }