File tree Expand file tree Collapse file tree 2 files changed +15
-7
lines changed
Expand file tree Collapse file tree 2 files changed +15
-7
lines changed Original file line number Diff line number Diff line change 1- buildscript {
2- repositories {
3- mavenCentral()
1+ def isDirty = { ->
2+ def stdout = new ByteArrayOutputStream ()
3+ exec {
4+ commandLine ' git' , ' status' , ' --porcelain'
5+ standardOutput = stdout
46 }
5- dependencies {
6- classpath ' com.github.townsfolk:gradle-release:1.2'
7+ return stdout. toString(). trim()
8+ }
9+ def getVersionName = { ->
10+ def stdout = new ByteArrayOutputStream ()
11+ exec {
12+ commandLine ' git' , ' describe' , ' --tags'
13+ standardOutput = stdout
714 }
15+ def gitVersionName = stdout. toString(). trim()
16+ return isDirty() ? gitVersionName + ' -SNAPSHOT' : gitVersionName
817}
18+ version = getVersionName()
919
1020repositories {
1121 mavenCentral()
1929apply plugin : ' idea'
2030apply plugin : ' maven'
2131apply plugin : ' groovy'
22- apply plugin : ' release'
2332
2433group ' org.scoverage'
2534
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments