Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
isochrone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Institut für Informatik
dbis
dbis-isochrone
isochrone
Commits
31349c55
Commit
31349c55
authored
10 years ago
by
User expired
Browse files
Options
Downloads
Patches
Plain Diff
added changelog generation to build process
(by now the changelog is not checked in into git)
parent
bc0b4ddc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
build.gradle
+39
-1
39 additions, 1 deletion
build.gradle
with
39 additions
and
1 deletion
build.gradle
+
39
−
1
View file @
31349c55
...
...
@@ -107,6 +107,25 @@ def getDate() {
return
formattedDate
}
def
readGitTags
()
{
def
tags
=
[]
def
proc
=
"git tag"
.
execute
()
proc
.
in
.
eachLine
{
line
->
tags
+=
line
}
Collections
.
reverse
(
tags
)
tags
}
def
readGitMessages
(
String
tag
,
String
prevTag
)
{
def
message
=
[]
def
range
=
(
prevTag
==
null
||
prevTag
==
""
)
?
"$tag"
:
"$prevTag..$tag"
def
proc
=
"git log $range --oneline --no-merges"
.
execute
()
proc
.
in
.
eachLine
{
line
->
message
+=
line
}
proc
.
err
.
eachLine
{
line
->
println
line
}
message
}
// Detailled settings (dependencies, tasks, task configuration, ...)
repositories
{
...
...
@@ -276,6 +295,25 @@ vagrantDestroy.doFirst {
// Custom task definitions
task
changelog
<<
{
def
fileChangelog
=
new
File
(
'CHANGELOG.md'
)
def
tags
=
[
"HEAD"
]
+
readGitTags
()
def
numTags
=
tags
.
size
();
def
prevTag
def
tag
fileChangelog
.
delete
()
for
(
int
i
=
0
;
i
<
numTags
;
i
++)
{
tag
=
tags
[
i
];
prevTag
=
tags
[
i
+
1
]
fileChangelog
<<
"- Version ${tag}:\n"
.
replaceAll
(
"Version HEAD"
,
"Upcoming version"
)
def
message
=
readGitMessages
(
tag
,
prevTag
)
message
.
each
{
fileChangelog
<<
" - $it\n"
}
fileChangelog
<<
"\n"
}
}
task
cleanAfterDaily
(
type:
Delete
)
{
delete
"$buildDir/dependency-cache"
delete
"$buildDir/tmp"
...
...
@@ -371,7 +409,7 @@ task vagrantPrepare << {
task
jarAll
(
dependsOn:
[
jar
,
javadocJar
,
sourcesJar
,
staticJar
,
testJar
])
task
buildAll
(
dependsOn:
[
jarAll
,
build
])
task
daily
(
dependsOn:
[
clean
,
asciidoctor
,
check
,
javadoc
,
jarAll
])
task
daily
(
dependsOn:
[
clean
,
asciidoctor
,
changelog
,
check
,
javadoc
,
jarAll
])
task
release
// task dependencies
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment