Created
March 31, 2011 16:24
-
-
Save davejlong/896691 to your computer and use it in GitHub Desktop.
Ant script to build a complete Mura FW1 plugin and version with a build number
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version.buildnumber=00 | |
version.major=1 | |
version.minor=1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<project name="StudentMS" default="zip" basedir="."> | |
<propertyfile file="./.ant/build.properties"> | |
<entry key="version.buildnumber" type="int" default="0" operation="+" pattern="00" /> | |
</propertyfile> | |
<property file="./.ant/build.properties" /> | |
<property name="sourceDir" location="/Users/dave/Workspace/ColdFusion/StudentMS" /> | |
<property name="buildDir" location="${sourceDir}/build" /> | |
<property name="buildsDir" location="${sourceDir}/builds" /> | |
<property name="fullversion" value="${version.major}.${version.minor}" /> | |
<target name="zip" depends="version" description="Zips the directory into a file in the builds directory"> | |
<echo message="Zipping contents..." /> | |
<zip destfile="${buildsDir}\${version.buildnumber}.zip" basedir="${buildDir}" /> | |
<echo message="Cleaning everything up" /> | |
<delete includeEmptyDirs="true"> | |
<fileset dir="${buildDir}" includes="**" /> | |
</delete> | |
</target> | |
<target name="version" depends="copybuild" description="Adds a major and minor version to the build."> | |
<echo message="Updating build number in /plugin/config.xml.cfm" /> | |
<replace file="${buildDir}/plugin/config.xml.cfm"> | |
<replacefilter token="@{version}@" value="${fullversion}" /> | |
<replacefilter token="@{buildnumber}@" value="${version.buildnumber}" /> | |
</replace> | |
</target> | |
<target name="copybuild" description="Copies the current source to the build directory"> | |
<echo message="Copying to build directory" /> | |
<mkdir dir="${buildDir}" /> | |
<copy todir="${buildDir}"> | |
<fileset dir="${sourceDir}"> | |
<include name="**/admin/**" /> | |
<include name="**/public/**" /> | |
<include name="**/plugin/**" /> | |
<include name="**/assets/**" /> | |
<include name="**/common/**" /> | |
<include name="**/config/**" /> | |
<include name="**/plugin/**" /> | |
<include name="Application.cfc" /> | |
<include name="fw1.cfc" /> | |
<include name="fw1config.cfm" /> | |
<include name="index.cfm" /> | |
<include name="pluginEventHandler.cfc" /> | |
</fileset> | |
</copy> | |
</target> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment