构建工具phing (原创)

Phing 是一个基于Apache ANT 的项目构建系统,phing内置可以执行一系列替换

比如:在你的开发版本和产品版本间改变include路径、执行SQL语句、移动和复制文件、运行外部脚本等等

 

安装命令

#清除缓存

pearclear-cache

#(更新pear)

pearupgrade-all

# 安装Phpdocumentor

pearchannel-discover pear.phing.info

pearinstall --alldeps phing/phing      

 

参考文档:

官网:

http://www.phing.info

安装参考:

http://www.phing.info/trac/wiki/Users/Installation

 

 

 

 

 

执行命令

#执行build.xml 默认任务

phing

#执行build.xml 中 test 任务

phing test

 

自动化

phing 默认配置文件为:build.xml.

下面通过.xml 文件来介绍一下build.xml标签的用法与含义

<?xml version="1.0"encoding="UTF-8"?>

<project name="WMS" basedir="." default="exec">

 

 <!--构建后清理-->   

 <target name="clean"> 

  <delete dir="build"/>

  <delete dir="src/Runtime"/>

 </target>

<!--构建前准备-->    

 <target name="prepare"> 

  <mkdir dir="build"/> 

 </target>

 

<!--生成api,打包发送到VSS,提示输入版本号-->

 <target name="api"> 

    <exec command="phpdoc" />

 </target> 

   

<!-- 测试 -->

<target name="phpunitserice"> 

    <exec command="phpunit" />

</target>

   

<!--版本构建,文档,源码打包发送VSS,提示输入版本号-->

<target name="source"> 

   

</target>

   

<!--默认任务-->

<target name="exec" depends="clean,prepare,api,phpunitserice"/>

      

</project>

 

 

命令行输入:phing

 

参考文档:

phing 脚本介绍:

http://blog.csdn.net/chinabluexfw/article/details/7484101

官网文档,包括脚本介绍

http://www.phing.info/docs/guide/current/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值