You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by cr...@apache.org on 2010/06/06 07:26:23 UTC
svn commit: r951824 - /forrest/trunk/plugins/build.xml
Author: crossley
Date: Sun Jun 6 05:26:23 2010
New Revision: 951824
URL: http://svn.apache.org/viewvc?rev=951824&view=rev
Log:
Use plain svn commands rather than Jsvn.
Issue: FOR-1198
Modified:
forrest/trunk/plugins/build.xml
Modified: forrest/trunk/plugins/build.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/plugins/build.xml?rev=951824&r1=951823&r2=951824&view=diff
==============================================================================
--- forrest/trunk/plugins/build.xml (original)
+++ forrest/trunk/plugins/build.xml Sun Jun 6 05:26:23 2010
@@ -41,8 +41,6 @@
<property name="plugin.docPath" value="pluginDocs"/>
<property name="plugin.downloadServer" value="http://forrest.apache.org/plugins"/>
<property name="plugin.downloadPath" value="plugins"/>
- <property name="deploy.svn.user" value=""/>
- <property name="deploy.svn.password" value=""/>
<property name="deploy.plugins.svn.url" value="https://svn.apache.org/repos/asf/forrest/site/plugins"/>
<property name="deploy.plugin.docs.svn.url" value="https://svn.apache.org/repos/asf/forrest/site/pluginDocs"/>
<property name="deploy.plugins.svn-dir" location="${forrest.build.dir}/svn-plugins-deploy"/>
@@ -166,11 +164,11 @@
overwrite="true"
file="${forrest.plugins.descriptor.file}"/>
<!-- check in to SVN -->
- <svncommit
- target="${deploy.plugins.svn-dir}"
- repositoryurl="${deploy.plugins.svn.url}"
- commitmessage="Deployment plugins descriptor file plugins.xml (deployed by 'deploy-plugins.xml' target of plugin build script)"
- />
+ <exec executable="svn" dir="." failonerror="true">
+ <arg value="commit"/>
+ <arg value="${deploy.plugins.svn-dir}"/>
+ <arg value="-m Deployment plugins descriptor file plugins.xml (deployed by 'deploy-plugins.xml' target of plugin build script)"/>
+ </exec>
</target>
<target name="deploy-docs"
description="Deploy the plugin documentation"
@@ -216,7 +214,6 @@
<include name="**/*.js"/>
</fixcrlf>
<!-- add new files to SVN -->
-<!-- svnadd doesn't work (it doesn't change the working directory properly) -->
<exec executable="svn" dir="${deploy.docs.svn-dir}" output="${deploy.docs.svn-filestoadd}" failonerror="true">
<arg value="status"/>
</exec>
@@ -225,22 +222,37 @@
filenames in the list are new files
-->
<replace file="${deploy.docs.svn-filestoadd}" token="? " value=""/>
- <replace file="${deploy.docs.svn-filestoadd}" token="M " value=""/>
+ <replaceregexp file="${deploy.docs.svn-filestoadd}"
+ match="M .*\n"
+ replace=""
+ byline="false" flags="s"/>
<!-- don't fail on error here because
1) the targets file might have 'bad' filenames but we should continue
2) we would've already failed if the svn executable wasn't found
-->
- <exec executable="svn" dir="${deploy.docs.svn-dir}">
- <arg value="add"/>
- <arg value="--targets"/>
- <arg value="${deploy.docs.svn-filestoadd}"/>
- </exec>
+ <condition property="addedFilesDocs">
+ <length file="${deploy.docs.svn-filestoadd}" when="greater" length="0" />
+ </condition>
+ <if>
+ <equals arg1="${addedFilesDocs}" arg2="true" />
+ <then>
+ <echo level="info" message="New documents were added." />
+ <exec executable="svn" dir="${deploy.docs.svn-dir}">
+ <arg value="add"/>
+ <arg value="--targets"/>
+ <arg value="${deploy.docs.svn-filestoadd}"/>
+ </exec>
+ </then>
+ <else>
+ <echo level="info" message="No new documents have been added." />
+ </else>
+ </if>
<!-- check in to SVN -->
- <svncommit
- target="${deploy.docs.svn-dir}/plugins_${docsVersion}"
- repositoryurl="${deploy.plugins.svn.url}"
- commitmessage="Deployment of docs for ${plugin-name} plugin (deployed by 'deploy-docs' target of plugin build script)"
- />
+ <exec executable="svn" dir="." failonerror="true">
+ <arg value="commit"/>
+ <arg value="${deploy.docs.svn-dir}/plugins_${docsVersion}"/>
+ <arg value="-m Deployment of docs for ${plugin-name} plugin (deployed by 'deploy-docs' target of plugin build script)"/>
+ </exec>
</target>
<target name="release"
description="Release the versioned plugin to the website SVN to make it available for download"
@@ -261,7 +273,6 @@ You have just released a plugin. There a
<target name="updateSVN"
description="Update SVN with the files in the sandbox">
<!-- add new files to SVN -->
-<!-- svnadd doesn't work (it doesn't change the working directory properly) -->
<exec executable="svn" dir="${deploy.plugins.svn-dir}" output="${deploy.plugins.svn-filestoadd}" failonerror="true">
<arg value="status"/>
</exec>
@@ -270,22 +281,37 @@ You have just released a plugin. There a
filenames in the list are new files
-->
<replace file="${deploy.plugins.svn-filestoadd}" token="? " value=""/>
- <replace file="${deploy.plugins.svn-filestoadd}" token="M " value=""/>
+ <replaceregexp file="${deploy.plugins.svn-filestoadd}"
+ match="M .*\n"
+ replace=""
+ byline="false" flags="s"/>
<!-- don't fail on error here because
1) the targets file might have 'bad' filenames but we should continue
2) we would've already failed if the svn executable wasn't found
-->
- <exec executable="svn" dir="${deploy.plugins.svn-dir}">
- <arg value="add"/>
- <arg value="--targets"/>
- <arg value="${deploy.plugins.svn-filestoadd}"/>
- </exec>
+ <condition property="addedFilesPlugin">
+ <length file="${deploy.plugins.svn-filestoadd}" when="greater" length="0" />
+ </condition>
+ <if>
+ <equals arg1="${addedFilesPlugin}" arg2="true" />
+ <then>
+ <echo level="info" message="New files were added." />
+ <exec executable="svn" dir="${deploy.plugins.svn-dir}">
+ <arg value="add"/>
+ <arg value="--targets"/>
+ <arg value="${deploy.plugins.svn-filestoadd}"/>
+ </exec>
+ </then>
+ <else>
+ <echo level="info" message="No new files have been added." />
+ </else>
+ </if>
<!-- check in to SVN -->
- <svncommit
- target="${deploy.plugins.svn-dir}"
- repositoryurl="${deploy.plugins.svn.url}"
- commitmessage="Deployment of ${plugin-name} plugin (deployed by 'deploy' target of plugin build script)"
- />
+ <exec executable="svn" dir="." failonerror="true">
+ <arg value="commit"/>
+ <arg value="${deploy.plugins.svn-dir}"/>
+ <arg value="-m Deployment of ${plugin-name} plugin (deployed by 'deploy' target of plugin build script)"/>
+ </exec>
</target>
<target name="deploy"
description="Deploy the unversioned plugin to the website SVN to make it available for download"
@@ -304,24 +330,20 @@ You have just released a plugin. There a
<target name="checkout-deployed-docs"
description="Retrieve the currently deployed plugin files">
<!-- get current plugins directory from SVN -->
- <svncheckout
- repositoryurl="${deploy.plugin.docs.svn.url}"
- username="${deploy.svn.user}"
- password="${deploy.svn.password}"
- destination="${deploy.docs.svn-dir}"
- failonerror="false"
- />
+ <exec executable="svn" dir="." failonerror="true">
+ <arg value="co"/>
+ <arg value="${deploy.plugin.docs.svn.url}"/>
+ <arg value="${deploy.docs.svn-dir}"/>
+ </exec>
</target>
<target name="checkout-deployed-plugins"
description="Retrieve the currently deployed plugin files">
<!-- get current plugins directory from SVN -->
- <svncheckout
- repositoryurl="${deploy.plugins.svn.url}"
- username="${deploy.svn.user}"
- password="${deploy.svn.password}"
- destination="${deploy.plugins.svn-dir}"
- failonerror="true"
- />
+ <exec executable="svn" dir="." failonerror="true">
+ <arg value="co"/>
+ <arg value="${deploy.plugins.svn.url}"/>
+ <arg value="${deploy.plugins.svn-dir}"/>
+ </exec>
</target>
<target name="docs" depends="local-deploy">
<echo level="info">Building Docs for ${plugin-name}</echo>
Re: svn commit: r951824 - /forrest/trunk/plugins/build.xml
Posted by David Crossley <cr...@apache.org>.
Tim Williams wrote:
> > Author: crossley
> > Date: Sun Jun 6 05:26:23 2010
> > New Revision: 951824
> >
> > URL: http://svn.apache.org/viewvc?rev=951824&view=rev
> > Log:
> > Use plain svn commands rather than Jsvn.
> > Issue: FOR-1198
>
> Sorry David, I said I'd take a look at this and never came back to it.
> Thanks...
No worries, i didn't expect that.
-David
Re: svn commit: r951824 - /forrest/trunk/plugins/build.xml
Posted by Tim Williams <wi...@gmail.com>.
On Sun, Jun 6, 2010 at 1:26 AM, <cr...@apache.org> wrote:
> Author: crossley
> Date: Sun Jun 6 05:26:23 2010
> New Revision: 951824
>
> URL: http://svn.apache.org/viewvc?rev=951824&view=rev
> Log:
> Use plain svn commands rather than Jsvn.
> Issue: FOR-1198
Sorry David, I said I'd take a look at this and never came back to it.
Thanks...
--tim