summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiovanni Harting <539@idlegandalf.com>2016-07-21 19:06:07 +0200
committerGiovanni Harting <539@idlegandalf.com>2016-07-21 19:06:07 +0200
commit181fdc196e112da7428e9f07273899fe76ab2a1a (patch)
treee79259491172ce2ece9c683771c882c904eea91e
parentfbdb595cd7457ac370e78a1877089d0ffe0626b2 (diff)
another approach to the automated building
-rw-r--r--build.gradle16
1 files changed, 4 insertions, 12 deletions
diff --git a/build.gradle b/build.gradle
index 2cd43fe..972f773 100644
--- a/build.gradle
+++ b/build.gradle
@@ -37,26 +37,18 @@ group = "com.sosnitzka" // http://maven.apache.org/guides/mini/guide-naming-conv
archivesBaseName = "taiga"
task buildInfo {
- def cmd = "git describe --tags \$(git rev-list --tags --max-count=1)"
- def proc = cmd.execute()
- proc.waitFor()
- if (proc.exitValue() == 0) {
- logger.info("Found tag for current version: ${proc.text.trim()}")
- ext.revision = proc.text.trim()
+ if (System.getenv().TAG != null) {
+ ext.revision = System.getenv().TAG
} else {
ext.revision = "snapshot"
- logger.info("Could not find tag infos, assume snapshot build")
}
if (System.getenv().BUILD_NUMBER != null) {
ext.buildNum = System.getenv().BUILD_NUMBER
}
- def cmd_changes = "git log \$(git describe --tags --abbrev=0)..\$(git describe --tags \$(git rev-list --tags --max-count=1)) --oneline"
- def proc_changes = cmd_changes.execute()
- proc_changes.waitFor()
- if (proc_changes.exitValue() == 0) {
- ext.changes = proc_changes.text.trim()
+ if (System.getenv().CHANGES != null) {
+ ext.changes = System.getenv().CHANGES
} else {
ext.changes = ""
}