2009-11-10 17:49:19 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2009-11-14 10:24:08 +00:00
|
|
|
<project name="SemanticScuttle" default="zip" basedir=".">
|
2009-11-10 17:49:19 +00:00
|
|
|
<!--
|
|
|
|
SemanticScuttle phing build file.
|
|
|
|
This script should provide a one-stop tool for all administrative
|
|
|
|
tasks around SemanticScuttle, like creating a release version,
|
|
|
|
tagging a release, running unit tests etc.
|
|
|
|
-->
|
2009-11-13 23:15:30 +00:00
|
|
|
<property file="build.properties" />
|
2010-08-22 12:45:14 +00:00
|
|
|
<property file="html.properties" />
|
2009-11-10 17:54:44 +00:00
|
|
|
|
2010-06-09 05:59:51 +00:00
|
|
|
<property name="version-m" value="0.97" />
|
|
|
|
<property name="version" value="0.97.0" />
|
2010-08-12 20:01:48 +00:00
|
|
|
<property name="stability" value="beta" />
|
|
|
|
<property name="releasenotes" value="- Many SQL optimizations
|
|
|
|
- SemanticScuttle shows bookmarks 4 times faster now
|
|
|
|
- New config option to skip 'SET NAMES UTF8' call: $dbneedssetnames
|
|
|
|
- Do not highlight admin bookmarks when $enableAdminColors is disabled
|
|
|
|
- Add russian translation
|
|
|
|
- Make HTML export follow the specifications a bit better
|
|
|
|
- Fix bug #2953732: faulty error message for duplicate bookmarks
|
|
|
|
- Fix bug #2960663: do not send content-type headers twice for ajax/api scripts
|
|
|
|
- Fix bug #2976593: fr_FR locale is vietnamese
|
|
|
|
" />
|
2010-08-22 11:10:15 +00:00
|
|
|
<property name="zipfile" value="${phing.project.name}-${version}.zip" />
|
|
|
|
<property name="pkgfile" value="${phing.project.name}-${version}.tgz" />
|
|
|
|
<property name="distfile" value="dist/${zipfile}" />
|
|
|
|
<property name="distpkgfile" value="dist/pear/${pkgfile}" />
|
|
|
|
<property name="sfproject" value="SemanticScuttle" />
|
|
|
|
<property name="sffilepath" value="s/se/semanticscuttle/" />
|
|
|
|
<property name="svnpath" value="https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/" />
|
2009-11-13 23:15:30 +00:00
|
|
|
|
2011-07-04 16:05:33 +00:00
|
|
|
<taskdef name="rST" classname="phing.tasks.ext.rSTTask" />
|
|
|
|
<taskdef name="d51pearpkg2" classname="phing.tasks.ext.d51PearPkg2Task" />
|
2010-08-21 22:25:54 +00:00
|
|
|
|
2009-11-14 10:24:08 +00:00
|
|
|
<target name="zip" depends="check"
|
2009-11-13 23:15:30 +00:00
|
|
|
description="Create zip file for release"
|
|
|
|
>
|
2009-11-10 17:54:44 +00:00
|
|
|
<!--
|
|
|
|
The release file is for end users, so it is safe to
|
|
|
|
remove anything developer-related.
|
|
|
|
|
|
|
|
Test your zip with: unzip -l SemanticScuttle-0.95.0.zip
|
|
|
|
-->
|
|
|
|
<echo msg="Creating distribution zip for SemanticScuttle ${version}"/>
|
2009-11-13 23:15:30 +00:00
|
|
|
<delete file="${distfile}" failonerror="false"/>
|
|
|
|
<zip destfile="${distfile}" prefix="${phing.project.name}-${version}/">
|
2009-11-10 17:49:19 +00:00
|
|
|
<fileset dir=".">
|
2009-11-13 23:16:23 +00:00
|
|
|
<include name="data/**"/>
|
|
|
|
<include name="doc/**"/>
|
|
|
|
<include name="src/**"/>
|
|
|
|
<include name="www/**"/>
|
|
|
|
<exclude name="**/.gitignore/"/>
|
2009-11-10 17:54:44 +00:00
|
|
|
<exclude name="**/.svn/"/>
|
2009-11-10 17:49:19 +00:00
|
|
|
<exclude name="data/config.php"/>
|
2009-11-10 17:54:44 +00:00
|
|
|
<exclude name="data/locales/messages.po"/>
|
|
|
|
<exclude name="data/locales/*/LC_MESSAGES/messages.po"/>
|
|
|
|
<exclude name="doc/developers/"/>
|
|
|
|
<exclude name="src/php-gettext/examples/" />
|
|
|
|
<exclude name="src/php-gettext/bin/"/>
|
2009-11-10 17:49:19 +00:00
|
|
|
</fileset>
|
|
|
|
</zip>
|
|
|
|
</target>
|
|
|
|
|
2009-11-13 23:15:30 +00:00
|
|
|
|
2009-11-14 10:24:08 +00:00
|
|
|
|
2010-02-16 20:38:59 +00:00
|
|
|
<target name="package" depends="check"
|
|
|
|
description="Creates the pear package"
|
|
|
|
>
|
|
|
|
<!-- fixme: create package.xml with d51pearpkg2 -->
|
2010-08-21 22:25:54 +00:00
|
|
|
<d51pearpkg2 dir="." baseinstalldir="/">
|
|
|
|
<name>SemanticScuttle</name>
|
|
|
|
<summary>A social bookmarking tool</summary>
|
|
|
|
<description>
|
|
|
|
A social bookmarking tool experimenting with new features
|
|
|
|
like structured tags or collaborative descriptions of tags.
|
|
|
|
</description>
|
2010-08-22 11:10:15 +00:00
|
|
|
<channel>semanticscuttle.sourceforge.net</channel>
|
2010-08-21 22:25:54 +00:00
|
|
|
|
|
|
|
<lead user="cweiske" name="Christian Weiske" email="cweiske@cweiske.de" />
|
|
|
|
<license>GPL</license>
|
|
|
|
|
|
|
|
<version release="${version}" api="${version}" />
|
|
|
|
<stability release="${stability}" api="${stability}" />
|
|
|
|
|
|
|
|
<notes>${releasenotes}</notes>
|
|
|
|
|
|
|
|
<dependencies>
|
|
|
|
<php minimum_version="5.2.0" />
|
|
|
|
<pear minimum_version="1.8.1" />
|
|
|
|
|
|
|
|
<package name="HTML_QuickForm2"
|
|
|
|
channel="pear.php.net"
|
|
|
|
minimum_version="0.4.0"
|
|
|
|
/>
|
|
|
|
|
|
|
|
</dependencies>
|
|
|
|
|
2010-08-21 22:57:31 +00:00
|
|
|
<!-- map directory (key) to role -->
|
2010-08-21 22:25:54 +00:00
|
|
|
<dirroles key="www">www</dirroles>
|
|
|
|
<dirroles key="data">data</dirroles>
|
|
|
|
<dirroles key="doc">doc</dirroles>
|
|
|
|
<dirroles key="src">php</dirroles>
|
|
|
|
<dirroles key="tests">test</dirroles>
|
|
|
|
|
2010-08-21 23:07:29 +00:00
|
|
|
<!-- do not add the following files to the package.
|
|
|
|
copied from excludes above -->
|
|
|
|
<ignore>**/.gitignore</ignore>
|
|
|
|
<ignore>**/.svn</ignore>
|
2010-08-21 22:25:54 +00:00
|
|
|
<ignore>build*</ignore>
|
2010-08-21 23:07:29 +00:00
|
|
|
<ignore>data/config.php</ignore>
|
|
|
|
<ignore>data/locales/messages.po</ignore>
|
|
|
|
<ignore>data/locales/*/LC_MESSAGES/messages.po</ignore>
|
2010-08-21 23:04:03 +00:00
|
|
|
<ignore>dist/**</ignore>
|
2010-08-21 23:07:29 +00:00
|
|
|
<ignore>doc/developers/**</ignore>
|
2010-08-21 23:04:03 +00:00
|
|
|
<ignore>scripts/**</ignore>
|
2010-08-21 23:07:29 +00:00
|
|
|
<ignore>src/php-gettext/examples/**</ignore>
|
|
|
|
<ignore>src/php-gettext/bin/**</ignore>
|
2010-08-21 23:26:30 +00:00
|
|
|
<ignore>*.tgz</ignore>
|
2010-08-22 12:55:51 +00:00
|
|
|
<ignore>*.properties</ignore>
|
2010-08-21 23:26:30 +00:00
|
|
|
|
|
|
|
<replacement
|
|
|
|
path="src/SemanticScuttle/header.php"
|
2011-05-25 17:43:36 +00:00
|
|
|
type="pear-config" from="@data_dir@" to="data_dir"
|
|
|
|
/>
|
|
|
|
<replacement
|
|
|
|
path="src/SemanticScuttle/header.php"
|
|
|
|
type="pear-config" from="@www_dir@" to="www_dir"
|
2010-08-21 23:26:30 +00:00
|
|
|
/>
|
|
|
|
<replacement
|
|
|
|
path="www/www-header.php"
|
2011-05-25 17:43:36 +00:00
|
|
|
type="pear-config" from="@data_dir@" to="data_dir"
|
2010-08-21 23:26:30 +00:00
|
|
|
/>
|
|
|
|
<replacement
|
|
|
|
path="tests/prepare.php"
|
2011-05-25 17:43:36 +00:00
|
|
|
type="pear-config" from="@data_dir@" to="data_dir"
|
2010-08-21 23:26:30 +00:00
|
|
|
/>
|
2010-08-21 22:25:54 +00:00
|
|
|
|
|
|
|
<changelog version="0.97" date="2010-06-09" license="GPL">
|
|
|
|
- Many SQL optimizations - SemanticScuttle shows bookmarks 4 times faster now
|
|
|
|
- New config option to skip "SET NAMES UTF8" call: $dbneedssetnames
|
|
|
|
- Do not highlight admin bookmarks when $enableAdminColors is disabled
|
|
|
|
- Add russian translation
|
|
|
|
- Make HTML export follow the specifications a bit better
|
|
|
|
- Fix bug #2953732: faulty error message for duplicate bookmarks
|
|
|
|
- Fix bug #2960663: do not send content-type headers twice for ajax/api scripts
|
|
|
|
- Fix bug #2976593: fr_FR locale is vietnamese
|
|
|
|
</changelog>
|
|
|
|
|
|
|
|
<!-- <dirroles key="bin">script</dirroles> -->
|
|
|
|
<!-- <replacement path="bin/doctrine" type="pear-config" from="@php_bin@" to="php_bin" /> -->
|
|
|
|
<!-- <release>
|
|
|
|
<install as="doctrine" name="bin/doctrine" />
|
|
|
|
-->
|
|
|
|
</d51pearpkg2>
|
2010-08-21 22:57:31 +00:00
|
|
|
|
|
|
|
<!-- time to fix the package.xml file since the task does not
|
|
|
|
allow everything we need:
|
|
|
|
- strip the base directory names like src, data and www
|
|
|
|
- remove that dumb baseinstalldir from files
|
|
|
|
- md5sums are generated automatically when packaging
|
|
|
|
-->
|
|
|
|
<!-- yes, we need to generate a 2nd file and move it back -->
|
|
|
|
<copy file="package.xml" tofile="package2.xml" overwrite="true">
|
|
|
|
<filterchain>
|
|
|
|
<replaceregexp>
|
|
|
|
<!-- remove md5sums -->
|
|
|
|
<regexp
|
|
|
|
pattern="md5sum="[a-z0-9]{32}" "
|
|
|
|
replace=""
|
|
|
|
/>
|
|
|
|
<!-- remove baseinstalldir for files -->
|
|
|
|
<regexp
|
|
|
|
pattern="<file baseinstalldir="/""
|
|
|
|
replace="<file"
|
|
|
|
/>
|
|
|
|
<!-- install-as for different directories -->
|
|
|
|
<regexp
|
2010-08-21 23:04:03 +00:00
|
|
|
pattern="(<file name="data/(.+?)")"
|
|
|
|
replace="\1 install-as="\2""
|
|
|
|
/>
|
|
|
|
<regexp
|
|
|
|
pattern="(<file name="doc/(.+?)")"
|
|
|
|
replace="\1 install-as="\2""
|
|
|
|
/>
|
|
|
|
<regexp
|
|
|
|
pattern="(<file name="tests/(.+?)")"
|
|
|
|
replace="\1 install-as="\2""
|
|
|
|
/>
|
|
|
|
<regexp
|
|
|
|
pattern="(<file name="www/(.+?)")"
|
2010-08-21 22:57:31 +00:00
|
|
|
replace="\1 install-as="SemanticScuttle/\2""
|
|
|
|
/>
|
2010-08-21 23:04:03 +00:00
|
|
|
<regexp
|
|
|
|
pattern="(<file name="src/(.+?)")"
|
|
|
|
replace="\1 install-as="\2""
|
|
|
|
/>
|
2010-08-21 22:57:31 +00:00
|
|
|
</replaceregexp>
|
|
|
|
</filterchain>
|
|
|
|
</copy>
|
|
|
|
<move file="package2.xml" tofile="package.xml" overwrite="true" />
|
|
|
|
|
2010-08-21 23:46:20 +00:00
|
|
|
<!-- package up -->
|
|
|
|
<exec command="pear package" passthru="true" />
|
|
|
|
<move file="${pkgfile}" todir="dist/pear/" />
|
2010-08-12 20:01:48 +00:00
|
|
|
|
2010-08-21 23:46:20 +00:00
|
|
|
<delete file="package.xml" failonerror="true" />
|
2010-02-16 20:38:59 +00:00
|
|
|
</target>
|
|
|
|
|
|
|
|
|
2011-05-26 19:39:06 +00:00
|
|
|
<!-- you need to have the python docutils package installed, since
|
|
|
|
we use the rst2html tool -->
|
2011-07-04 16:05:33 +00:00
|
|
|
<target name="build-docs" description="render documentation">
|
|
|
|
<rST format="html" uptodate="true">
|
|
|
|
<fileset dir="doc">
|
|
|
|
<include name="ChangeLog"/>
|
|
|
|
<include name="**.txt"/>
|
|
|
|
<include name="**.rst"/>
|
|
|
|
<include name="**/*.rst"/>
|
|
|
|
<exclude name="LICENSE.txt"/>
|
|
|
|
<exclude name="developers/TODO.rst"/>
|
|
|
|
</fileset>
|
|
|
|
<mapper type="regexp" from="^doc/(.+?)(.rst|.txt)?$" to="dist/docs/\1.html"/>
|
|
|
|
</rST>
|
2011-05-26 16:03:46 +00:00
|
|
|
</target>
|
|
|
|
|
2011-05-26 19:05:59 +00:00
|
|
|
|
2011-02-15 23:42:45 +00:00
|
|
|
<target name="release" depends="check,zip,package,deploy-sf"
|
2009-11-14 10:24:08 +00:00
|
|
|
description="Release the version on sourceforge"
|
|
|
|
>
|
|
|
|
<!-- meta-target -->
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
2009-11-13 23:15:30 +00:00
|
|
|
<!--
|
|
|
|
/home/frs/project/s/se/semanticscuttle/SemanticScuttle/v0.94/
|
|
|
|
/home/frs/project/s/se/semanticscuttle/SemanticScuttle/v0.94/SemanticScuttle-v0.94.zip
|
|
|
|
/home/frs/project/s/se/semanticscuttle/SemanticScuttle/v0.94/SemanticScuttle-v0.94.1.zip
|
2009-11-13 23:18:07 +00:00
|
|
|
https://sourceforge.net/apps/trac/sourceforge/wiki/Release%20files%20for%20download
|
2009-11-13 23:15:30 +00:00
|
|
|
-->
|
2009-11-14 10:24:08 +00:00
|
|
|
<target name="deploy-sf" depends="check,zip"
|
2009-11-13 23:15:30 +00:00
|
|
|
description="Upload release to sourceforge"
|
|
|
|
>
|
|
|
|
<delete dir="dist/deploy-sf" /><!-- make empty -->
|
|
|
|
<mkdir dir="dist/deploy-sf" />
|
2009-11-16 20:51:00 +00:00
|
|
|
<mkdir dir="dist/deploy-sf/v${version-m}" />
|
|
|
|
<copy file="${distfile}" tofile="dist/deploy-sf/v${version-m}/${zipfile}"/>
|
2009-11-13 23:15:30 +00:00
|
|
|
<!-- test
|
|
|
|
<exec command="rsync -av dist/deploy-sf/ /tmp/test/" escape="false" />
|
|
|
|
-->
|
|
|
|
<exec
|
|
|
|
command="rsync -av -e ssh dist/deploy-sf/ ${sfuser},${sfproject}@frs.sourceforge.net:/home/frs/project/${sffilepath}/${sfproject}/"
|
2009-11-14 10:24:08 +00:00
|
|
|
escape="false" checkreturn="false"
|
|
|
|
/>
|
|
|
|
<!-- rsync always returns code 23 on sourceforge releases, so we
|
|
|
|
can't check return values -->
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
2010-08-22 11:10:15 +00:00
|
|
|
|
2010-08-22 12:46:13 +00:00
|
|
|
<target name="deploy-sf-pear" depends="check,package"
|
2010-08-22 11:10:15 +00:00
|
|
|
description="Update PEAR channel on sourceforge"
|
|
|
|
>
|
|
|
|
<available file="${websitedir}"
|
|
|
|
type="dir" property="available.websitedir"
|
|
|
|
/>
|
|
|
|
<fail unless="available.websitedir"
|
|
|
|
message="Website directory not set"
|
|
|
|
/>
|
|
|
|
<!--
|
|
|
|
1. rsync channel data from sourceforge to local, deleting
|
|
|
|
superfluous channel files. Need to do that so pirum knows
|
|
|
|
all previous releases when adding the new package
|
|
|
|
2. update channel with pirum update
|
|
|
|
3. rsync to sourceforge
|
|
|
|
-->
|
2010-08-22 12:45:47 +00:00
|
|
|
<exec
|
|
|
|
command="rsync --include-from=.rsync-include-files --delete -avP -e ssh ${sfuser},${sfproject}@web.sourceforge.net:htdocs/ ."
|
2010-08-22 11:10:15 +00:00
|
|
|
dir="${websitedir}"
|
|
|
|
escape="false" checkreturn="false"
|
|
|
|
passthru="true"
|
2010-08-22 12:45:47 +00:00
|
|
|
/>
|
2010-08-22 11:10:15 +00:00
|
|
|
|
|
|
|
<exec
|
|
|
|
command="pirum add ${websitedir} ${distpkgfile}"
|
|
|
|
passthru="true"
|
|
|
|
/>
|
2010-08-22 12:45:14 +00:00
|
|
|
<!-- fix the generated html -->
|
|
|
|
<!-- yes, we need to generate a 2nd file and move it back -->
|
|
|
|
<copy file="${websitedir}/index.html" tofile="${websitedir}/pirum.html" overwrite="true">
|
|
|
|
<filterchain>
|
|
|
|
<replaceregexp>
|
|
|
|
<!-- make meta links relative -->
|
|
|
|
<regexp
|
|
|
|
pattern="href="http://semanticscuttle.sourceforge.net/"
|
|
|
|
replace="href=""
|
|
|
|
/>
|
|
|
|
<!-- add sourceforge logo -->
|
|
|
|
<regexp
|
|
|
|
pattern="powered by "
|
|
|
|
replace="powered by ${html.sflogo} and "
|
|
|
|
/>
|
|
|
|
</replaceregexp>
|
|
|
|
</filterchain>
|
|
|
|
</copy>
|
2010-08-22 12:45:32 +00:00
|
|
|
|
|
|
|
<!-- overwrite pirum generated index with our own -->
|
|
|
|
<copy file="${websitedir}/our-index.html" tofile="${websitedir}/index.html" overwrite="true" />
|
|
|
|
|
2010-08-22 12:45:14 +00:00
|
|
|
<!-- add our custom css -->
|
|
|
|
<append
|
|
|
|
destFile="${websitedir}/pirum.css"
|
|
|
|
file="${websitedir}/pirum-custom.css"
|
|
|
|
/>
|
|
|
|
|
2010-08-22 11:10:15 +00:00
|
|
|
<!-- rsync always returns code 23 on sourceforge releases, so we
|
|
|
|
can't check return values -->
|
2010-08-22 12:45:47 +00:00
|
|
|
<exec
|
|
|
|
command="rsync --include-from=.rsync-include-files -avP -e ssh . ${sfuser},${sfproject}@web.sourceforge.net:htdocs/"
|
2010-08-22 11:10:15 +00:00
|
|
|
dir="${websitedir}"
|
|
|
|
escape="false" checkreturn="false"
|
|
|
|
passthru="true"
|
2010-08-22 12:45:47 +00:00
|
|
|
/>
|
2010-08-22 11:10:15 +00:00
|
|
|
</target>
|
|
|
|
|
|
|
|
|
2009-11-13 23:15:30 +00:00
|
|
|
<target name="check"
|
|
|
|
description="Check variables"
|
|
|
|
>
|
|
|
|
<fail unless="version" message="Version not defined!" />
|
|
|
|
<fail unless="sfuser" message="Sourceforge username not defined!" />
|
|
|
|
<fail unless="sfproject" message="Sourceforge project name not defined!" />
|
|
|
|
<fail unless="sffilepath" message="Sourceforge project file path not defined!" />
|
2011-05-26 16:03:46 +00:00
|
|
|
|
|
|
|
<mkdir dir="dist" />
|
2009-11-13 23:15:30 +00:00
|
|
|
</target>
|
|
|
|
|
2011-02-15 23:42:45 +00:00
|
|
|
</project>
|