Skip to content

Commit

Permalink
* build.xml: Added the preptag target, which automatically tags the
Browse files Browse the repository at this point in the history
        current code in trunk (excluding the tests directory and 
        build.xml) based on the release property in build.properties.
        Tweaked the cleanup target.  Added the changelog target to 
        generate changelog entries.
    * changelog.xsl: Added the XSLT stylesheet used to format the 
        Changelog entry with.

git-svn-id: http://svn.wp-plugins.org/feed-stats-plugin/trunk@135162 b8457f37-d9ea-0310-8a92-e5e31aec5664
  • Loading branch information
speedbreeze committed Jul 14, 2009
1 parent fe87f21 commit 0574ab0
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 2 deletions.
11 changes: 11 additions & 0 deletions ChangeLog
@@ -1,3 +1,13 @@
2009-07-14 Jonathan Wilde <speedbreeze@gmail.com>

* build.xml: Added the preptag target, which automatically tags the
current code in trunk (excluding the tests directory and
build.xml) based on the release property in build.properties.
Tweaked the cleanup target. Added the changelog target to
generate changelog entries.
* changelog.xsl: Added the XSLT stylesheet used to format the
Changelog entry with.

2009-07-09 Jonathan Wilde <speedbreeze@gmail.com>

* render.php: Cleaned up the stats viewer.
Expand Down Expand Up @@ -646,3 +656,4 @@
the configure page is a relative path rather than one that goes
to my site.


69 changes: 67 additions & 2 deletions build.xml
Expand Up @@ -30,7 +30,72 @@
tablength="4" eof="asis" />
<fixcrlf srcdir="." includes="**/*.html" eol="asis" tab="remove"
tablength="4" eof="asis" />
<fixcrlf srcdir="." includes="**/*.php" eol="asis" tab="remove"
tablength="4" eof="asis" />
<fixcrlf srcdir="." includes="**/*.php" excludes="**/*simpletest*"
eol="asis" tab="remove" tablength="4" eof="asis" />
</target>

<target name="preptag">
<!-- Create a new directory for this release. -->
<exec executable="svn">
<arg value="mkdir" />
<arg value="../tags/${release}" />
</exec>

<!-- Copy all of the appropriate folders into the tag folder. -->
<apply executable="svn">
<arg value="cp" />
<srcfile />
<dirset dir=".">
<include name="*" />
<exclude name="tests" />
</dirset>
<arg value="../tags/${release}/" />
</apply>

<!-- Copy all of the appropriate files into the tag folder. -->
<apply executable="svn">
<arg value="cp" />
<srcfile />
<fileset dir=".">
<include name="*.php" />
<include name="ChangeLog" />
<include name="COPYING" />
<include name="readme.txt" />
</fileset>
<arg value="../tags/${release}/" />
</apply>
</target>

<target name="changelog" description="Prepares a MOAP-style changelog entry.">
<exec executable="svn" vmlauncher="false" output="svnstatus.xml">
<arg line="status --xml" />
</exec>
<echo message="Fetched version information."/>

<tstamp>
<format property="changelog.timestamp" pattern="yyyy-MM-dd" />
</tstamp>

<xslt in="svnstatus.xml" out="ChangeLog-tmp" style="changelog.xsl">
<param name="timestamp" expression="${changelog.timestamp}"/>
<param name="author" expression="${user.name}" />
</xslt>

<replace file="ChangeLog-tmp">
<replacetoken><![CDATA[<?xml version="1.0" encoding="UTF-8"?>]]></replacetoken>
</replace>

<concat destfile="ChangeLog-com" fixlastline="true">
<fileset file="ChangeLog-tmp" />
<string><![CDATA[ ]]></string>
<fileset file="ChangeLog" />
</concat>
<echo message="Generated template." />

<delete file="ChangeLog" />
<move file="ChangeLog-com" tofile="ChangeLog" />
<delete file="ChangeLog-tmp" />
<delete file="svnstatus.xml" />
<echo message="Housekeeping complete." />
</target>
</project>
24 changes: 24 additions & 0 deletions changelog.xsl
@@ -0,0 +1,24 @@
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:param name="timestamp" />
<xsl:param name="author" />

<xsl:template match="/">

<xsl:value-of select="$timestamp"/>
<xsl:text> </xsl:text>
<xsl:value-of select="$author"/>
<xsl:text disable-output-escaping="yes"><![CDATA[ <youremail@mail.com> ]]>
</xsl:text>

<xsl:for-each select="status/target/entry">

<xsl:if test="string(wc-status/@item) != 'unversioned'">
* <xsl:value-of select="@path" />: </xsl:if>

</xsl:for-each>
</xsl:template>

</xsl:stylesheet>

0 comments on commit 0574ab0

Please sign in to comment.