mirror of https://github.com/apache/lucene.git
Minor improvements to other groovy scripts. Fix bug with missing <local/>
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1617102 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3dbb07b9c2
commit
6254a72b5c
|
@ -101,6 +101,7 @@
|
||||||
inline="true" conf="default" transitive="true" pathid="svnkit.classpath"/>
|
inline="true" conf="default" transitive="true" pathid="svnkit.classpath"/>
|
||||||
<local name="svn.checkprops.failed"/>
|
<local name="svn.checkprops.failed"/>
|
||||||
<local name="svn.unversioned.failed"/>
|
<local name="svn.unversioned.failed"/>
|
||||||
|
<local name="svn.keywords.failed"/>
|
||||||
<local name="svn.changed.failed"/>
|
<local name="svn.changed.failed"/>
|
||||||
<groovy taskname="svn" classpathref="svnkit.classpath"><![CDATA[
|
<groovy taskname="svn" classpathref="svnkit.classpath"><![CDATA[
|
||||||
import org.tmatesoft.svn.core.*;
|
import org.tmatesoft.svn.core.*;
|
||||||
|
@ -111,7 +112,7 @@
|
||||||
SVNStatusClient statusClient = manager.getStatusClient();
|
SVNStatusClient statusClient = manager.getStatusClient();
|
||||||
SVNWCClient wcClient = manager.getWCClient();
|
SVNWCClient wcClient = manager.getWCClient();
|
||||||
|
|
||||||
File basedir = new File(project.getProperty('basedir')).getAbsoluteFile();
|
File basedir = new File(properties['basedir']).getAbsoluteFile();
|
||||||
int baseLen = basedir.toString().length();
|
int baseLen = basedir.toString().length();
|
||||||
|
|
||||||
// do some fake check, to verify if this is valid SVN working copy. If this fails ignore checks but log some useful message.
|
// do some fake check, to verify if this is valid SVN working copy. If this fails ignore checks but log some useful message.
|
||||||
|
@ -173,13 +174,15 @@
|
||||||
file, prop -> withKeywords.add(convertRelative(file));
|
file, prop -> withKeywords.add(convertRelative(file));
|
||||||
} as ISVNPropertyHandler);
|
} as ISVNPropertyHandler);
|
||||||
|
|
||||||
def convertSet2String = {
|
def setProjectPropertyFromSet(prop, set) {
|
||||||
set -> set ? ('* ' + set.join(project.getProperty('line.separator') + '* ')) : null
|
if (set) {
|
||||||
|
properties[prop] = '* ' + set.join(properties['line.separator'] + '* ');
|
||||||
|
}
|
||||||
};
|
};
|
||||||
project.setProperty('svn.checkprops.failed', convertSet2String(missingProps));
|
setProjectPropertyFromSet('svn.checkprops.failed', missingProps);
|
||||||
project.setProperty('svn.keywords.failed', convertSet2String(withKeywords));
|
setProjectPropertyFromSet('svn.keywords.failed', withKeywords);
|
||||||
project.setProperty('svn.unversioned.failed', convertSet2String(unversioned));
|
setProjectPropertyFromSet('svn.unversioned.failed', unversioned);
|
||||||
project.setProperty('svn.changed.failed', convertSet2String(changed));
|
setProjectPropertyFromSet('svn.changed.failed', changed);
|
||||||
]]></groovy>
|
]]></groovy>
|
||||||
<fail if="svn.checkprops.failed"
|
<fail if="svn.checkprops.failed"
|
||||||
message="The following files are missing svn:eol-style (or binary svn:mime-type):${line.separator}${svn.checkprops.failed}"/>
|
message="The following files are missing svn:eol-style (or binary svn:mime-type):${line.separator}${svn.checkprops.failed}"/>
|
||||||
|
|
|
@ -320,16 +320,16 @@
|
||||||
|
|
||||||
<target name="define-lucene-javadoc-url" depends="resolve-groovy" unless="lucene.javadoc.url">
|
<target name="define-lucene-javadoc-url" depends="resolve-groovy" unless="lucene.javadoc.url">
|
||||||
<groovy><![CDATA[
|
<groovy><![CDATA[
|
||||||
String url, version = project.getProperty('version');
|
String url, version = properties['version'];
|
||||||
if (version.contains('-SNAPSHOT')) {
|
if (version.contains('-SNAPSHOT')) {
|
||||||
url = new File(project.getProperty('common.dir'), 'build' + File.separator + 'docs').toURI().toASCIIString();
|
url = new File(properties['common.dir'], 'build' + File.separator + 'docs').toURI().toASCIIString();
|
||||||
if (!(url =~ /\/$/)) url += '/';
|
if (!(url =~ /\/$/)) url += '/';
|
||||||
} else {
|
} else {
|
||||||
version = version.replace('.', '_');
|
version = version.replace('.', '_');
|
||||||
url = 'http://lucene.apache.org/core/' + version + '/';
|
url = 'http://lucene.apache.org/core/' + version + '/';
|
||||||
}
|
}
|
||||||
task.log('Using the following URL to refer to Lucene Javadocs: ' + url);
|
task.log('Using the following URL to refer to Lucene Javadocs: ' + url);
|
||||||
project.setProperty('lucene.javadoc.url', url);
|
properties['lucene.javadoc.url'] = url;
|
||||||
]]></groovy>
|
]]></groovy>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue