文件压缩:
<apply executable="java" parallel="false" failonerror="true" dest="../../release/publish/ecshop" append="false" force="true"> <fileset dir="../../release/publish/ecshop"> </fileset> <arg line="-jar" /> <arg path="${compressor}" /> <arg line="--charset utf8" /> <srcfile /> <arg line="-o" /> <mapper type="glob" from="*.js" to="*.js" /> <targetfile /> </apply>
<scp todir="${username_c}:${password_c}@${host_c}://usr/rete" trust="true"> <fileset dir='../../release/${version}/test/2儿童/'> <exclude name="${conf}" /> <exclude name="${Runtime}" /> <exclude name="${nbproject}" /> </fileset> </scp>
<echo level="info" message="正在获取指定目录的版本号..." /> <exec dir = "${svnurl}" executable = "svn.exe" output = "buildRevision"> <arg line = "info" /> <redirector> <outputfilterchain> <linecontainsregexp> <regexp pattern="^Revision:"/> </linecontainsregexp> <tokenfilter> <replaceregex pattern="Revision\:\s*" flags="s" replace="Revision="/> </tokenfilter> </outputfilterchain> </redirector> </exec> <property file="buildRevision" /> <property file="buildRevision_Inherit" /> <echo message="获取成功,版本号是${Revision}"/> <echo level="info" message="正在生成发布指定目录..." />
<redirector> <outputfilterchain> <linecontainsregexp> <regexp pattern="^Revision:"/> </linecontainsregexp> <tokenfilter> <replaceregex pattern="Revision\:\s*" flags="s" replace="Revision="/> </tokenfilter> </outputfilterchain> </redirector>
这个的意思是过滤掉SVNINFO命令行中其他,只留下Revision=版本号
然后再引进就可以了。
前端部署ant+yuicompressor文件压缩+获取版本号+SSH发布(部分代码),布布扣,bubuko.com
前端部署ant+yuicompressor文件压缩+获取版本号+SSH发布(部分代码)
原文地址:http://blog.csdn.net/confidence68/article/details/34803295