Make scripts more Groovy (remove relicts from JavaScript)

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1392678 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Uwe Schindler 2012-10-01 22:44:46 +00:00
parent 013753ac26
commit 4bfb6bf347
2 changed files with 3 additions and 4 deletions

View File

@ -108,7 +108,7 @@
} as ISVNPropertyHandler);
def convertSet2String = {
set -> set.isEmpty() ? null : ('* ' + set.toArray().join(project.getProperty('line.separator') + '* '))
set -> set ? ('* ' + set.join(project.getProperty('line.separator') + '* ')) : null
};
project.setProperty('svn.checkprops.failed', convertSet2String(missingProps));
project.setProperty('svn.unversioned.failed', convertSet2String(unversioned));

View File

@ -1859,9 +1859,8 @@ ${tests-output}/junit4-*.suites - per-JVM executed suites
);
StringBuilder html = new StringBuilder('<html>\n<head>\n');
// match the first heading in markdown and use as title:
def matcher = (markdownSource =~ /(?m)^#+\s*(.+)$/);
if (matcher.find()) {
html.append('<title>').append(FastEncoder.encode(matcher.group(1))).append('</title>\n');
markdownSource.find(~/(?m)^#+\s*(.+)$/) {
match, title -> html.append('<title>').append(FastEncoder.encode(title)).append('</title>\n');
}
html.append('<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\n')
.append('</head>\n<body>\n')