<projectname="api"default="build"><targetname="build"depends="make_runtime,check,tar"/><propertyname="version-m"value="1.1" /><propertyname="version"value="1.1.0" /><propertyname="stability"value="stable" /><propertyname="releasenotes"value="" /><propertyname="tarfile"value="${phing.project.name}.${buildnumber}.${buildid}.tar.gz" /><propertyname="pkgfile"value="${phing.project.name}.${version}.tgz" /><propertyname="distfile"value="dist/${tarfile}" /><propertyname="tests.dir"value="test" /><filesetid="api.tar.gz"dir="."><includename="test/**"/><includename="*.php"/><includename="*.xml"/>fileset><targetname="make_runtime"><mkdirdir="${project.basedir}/Runtime" /><mkdirdir="${project.basedir}/build/logs" /><mkdirdir="${project.basedir}/build/pdepend" /><mkdirdir="${project.basedir}/build/code-browser" />target><targetname="check"description="Check variables" ><failunless="version"message="Version not defined!" /><failunless="buildnumber"message="buildnumber not defined!" /><failunless="buildid"message="buildid not defined!" /><deletedir="dist"failonerror="false" /><mkdirdir="dist" />target><targetname="tar"depends="check"description="Create tar file for release"><echomsg="Creating distribution tar for ${phing.project.name} ${version}"/><deletefile="${distfile}"failonerror="false"/><tardestfile="${distfile}"compression="gzip"><filesetrefid="api.tar.gz"/>tar>target>project>
这里我们只做简单发布,没有加入php-unit等插件。
开始构建项目
新建—输入项目名称,选择构建自由风格的软件项目—下一步
配置源码管理
这里我们用的是GIT
增加构建步骤,选择Invoke Phing targets,再新增一个构建步骤,选择Send files or execute commands over SSH