Skip to content
Snippets Groups Projects
Commit f7d6ad62 authored by User expired's avatar User expired
Browse files

moving gradle changelog tasks to separate buildscript

parent 98df34c8
No related branches found
No related tags found
No related merge requests found
Upcoming version: Upcoming version:
------------------ -----------------
- moving gradle changelog tasks to separate buildscript (Nikolaus Krismer)
- fixing problems in changelog generation (again) (Nikolaus Krismer) - fixing problems in changelog generation (again) (Nikolaus Krismer)
- Merge branch 'master' of git@dbis-git.uibk.ac.at:krismer/isochrone-vm.git (Nikolaus Krismer)
- calling grgit add before grgit commit (by now push is empty) (Nikolaus Krismer) - calling grgit add before grgit commit (by now push is empty) (Nikolaus Krismer)
- not commiting changelogs in jenkins without changes :-) (Nikolaus Krismer) - not commiting changelogs in jenkins without changes :-) (Nikolaus Krismer)
- improving gradle changelog mechanism (excluding jenkins commits) (Nikolaus Krismer) - improving gradle changelog mechanism (excluding jenkins commits) (Nikolaus Krismer)
...@@ -14,7 +14,7 @@ Upcoming version: ...@@ -14,7 +14,7 @@ Upcoming version:
- adding removal of CHANGELOG to clean task (Nikolaus Krismer) - adding removal of CHANGELOG to clean task (Nikolaus Krismer)
Version v0.5.1: Version v0.5.1:
---------------- ---------------
- removed hard-coded version from gradle (is set using scmversion plugin) (Nikolaus Krismer) - removed hard-coded version from gradle (is set using scmversion plugin) (Nikolaus Krismer)
- added density generation for synthethic networks (Nikolaus Krismer) - added density generation for synthethic networks (Nikolaus Krismer)
- removed pgRouting / osm2pgrouting from files (not needed and never used) (Nikolaus Krismer) - removed pgRouting / osm2pgrouting from files (not needed and never used) (Nikolaus Krismer)
...@@ -34,12 +34,11 @@ Version v0.5.1: ...@@ -34,12 +34,11 @@ Version v0.5.1:
- increased version number (Nikolaus Krismer) - increased version number (Nikolaus Krismer)
Version v0.5.0: Version v0.5.0:
---------------- ---------------
- increased version number (Nikolaus Krismer) - increased version number (Nikolaus Krismer)
- geoserver version update (Nikolaus Krismer) - geoserver version update (Nikolaus Krismer)
- always adding pg_procedures to created database (not only when postgis is installed) (Nikolaus Krismer) - always adding pg_procedures to created database (not only when postgis is installed) (Nikolaus Krismer)
- added installation of phpLiteAdmin and spatialite (Nikolaus Krismer) - added installation of phpLiteAdmin and spatialite (Nikolaus Krismer)
- Merge branch 'master' of git@dbis-git.uibk.ac.at:krismer/isochrone-vm.git (Nikolaus Krismer)
- source profile in init script so it works without problems in centos 6 with the service command (Nikolaus Krismer) - source profile in init script so it works without problems in centos 6 with the service command (Nikolaus Krismer)
- Fixed tomcat startup message (root) - Fixed tomcat startup message (root)
- creating directories needed by script at the beginning (Nikolaus Krismer) - creating directories needed by script at the beginning (Nikolaus Krismer)
...@@ -55,7 +54,7 @@ Version v0.5.0: ...@@ -55,7 +54,7 @@ Version v0.5.0:
- increased version number (Nikolaus Krismer) - increased version number (Nikolaus Krismer)
Version v0.4.1: Version v0.4.1:
---------------- ---------------
- updating to java8u40 (Nikolaus Krismer) - updating to java8u40 (Nikolaus Krismer)
- removed support for fedora 20 some version updates added isochrone-tool artifact download -> generating synthetic networks in datbase now (Nikolaus Krismer) - removed support for fedora 20 some version updates added isochrone-tool artifact download -> generating synthetic networks in datbase now (Nikolaus Krismer)
- added documentation about VT-x/AMD-V in virtualbox (Nikolaus Krismer) - added documentation about VT-x/AMD-V in virtualbox (Nikolaus Krismer)
...@@ -66,7 +65,7 @@ Version v0.4.1: ...@@ -66,7 +65,7 @@ Version v0.4.1:
- Increased version number (Nikolaus Krismer) - Increased version number (Nikolaus Krismer)
Version v0.4.0: Version v0.4.0:
---------------- ---------------
- version upgrade to 0.4.0-SNAPSHOT (renaming 0.3.7-SNAPSHOT to 0.4.0-SNAPSHOT) (Nikolaus Krismer) - version upgrade to 0.4.0-SNAPSHOT (renaming 0.3.7-SNAPSHOT to 0.4.0-SNAPSHOT) (Nikolaus Krismer)
- update to latest apache-tomcat (version 8.0.18) (Nikolaus Krismer) - update to latest apache-tomcat (version 8.0.18) (Nikolaus Krismer)
- disabling port auto_correction (causes problems for test cases) (Nikolaus Krismer) - disabling port auto_correction (causes problems for test cases) (Nikolaus Krismer)
......
// Plugin declaration // Plugin declaration
buildscript {
apply from: 'http://dbis-informatik.uibk.ac.at/static/ma/niko/gradle/changelog.gradle'
}
plugins { plugins {
id 'com.bmuschko.vagrant' version '2.0' id 'com.bmuschko.vagrant' version '2.0'
id 'com.kageiit.url-cache' version '1.0.0' id 'com.kageiit.url-cache' version '1.0.0'
id 'de.ploing.scmversion' version '0.6.3' id 'de.ploing.scmversion' version '0.6.3'
id 'org.ajoberstar.grgit' version '1.2.0'
} }
apply plugin: 'eclipse' apply plugin: 'eclipse'
import org.ajoberstar.grgit.*
import org.apache.tools.ant.filters.FixCrLfFilter import org.apache.tools.ant.filters.FixCrLfFilter
import org.apache.tools.ant.filters.ReplaceTokens import org.apache.tools.ant.filters.ReplaceTokens
...@@ -97,63 +99,6 @@ vagrantDestroy.doFirst { ...@@ -97,63 +99,6 @@ vagrantDestroy.doFirst {
// Custom tasks // Custom tasks
task changelog << {
def grgit = Grgit.open(project.file('.'))
def fileChangelog = new File('CHANGELOG.md')
def isRelease = !project.version.endsWith('-SNAPSHOT')
def lastCommitByCI = false
def msgCommit = isRelease ? 'Releasing new version' : 'Updating changelog'
def nameUserCI = 'Jenkins'
// if we build a release we do not need to look at the HEAD (only until the tag which is built)
def tags = (isRelease) ? [] : ["HEAD"]
grgit.tag.list().reverse().each{ t ->
tags += t.getName()
}
fileChangelog.delete()
def builder
def commits
def numTags = tags.size()
for (int i = 0; i < numTags; ++i) {
builder = new StringBuilder()
builder.append("Version ${tags[i]}:\n".replaceAll('Version HEAD', 'Upcoming version'))
def tagLength = builder.size()
for (int j = 0; j < tagLength; ++j) {
builder.append('-')
}
builder.append('\n')
if (tags[i+1] == null) {
commits = grgit.log(includes: [tags[i]])
} else {
commits = grgit.log {
range tags[i+1], tags[i];
}
}
if (i == 0 && commits != null && commits[0] != null && nameUserCI.equalsIgnoreCase(commits[0].committer.name)) {
lastCommitByCI = true
}
commits.grep { commit ->
!nameUserCI.equalsIgnoreCase(commit.committer.name)
}.inject(builder) { bldr, commit ->
bldr.append(' - ')
bldr.append(commit.shortMessage)
bldr.append(' (' + commit.committer.name + ')')
bldr.append('\n')
}
builder.append('\n')
fileChangelog << builder.toString()
}
if (!lastCommitByCI) {
grgit.add(patterns: [fileChangelog.name])
grgit.commit(message: msgCommit, amend: false)
}
}
task vagrantExport(type: Zip) { task vagrantExport(type: Zip) {
description = 'Builds an archive file that contains the files, needed to create the vagrant box' description = 'Builds an archive file that contains the files, needed to create the vagrant box'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment