Last active
August 29, 2015 14:05
-
-
Save NoMan2000/a44c2e18a85ee9845343 to your computer and use it in GitHub Desktop.
phing playground
This file contains 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="demo" default="build"> | |
<property name="build2.message" value="Michael Soileau"/> | |
<property file='build.properties' /> | |
<!-- Currently has the variable build.dir and base.dir in it --> | |
<!-- Properties are how you include files in php from build.properties --> | |
<!-- Just say a message to make sure things are working. --> | |
<target name="build2.sayMessage"> | |
<echo message="${build.message} is beginning the test sequence." /> | |
<echo message="${base.dir} is the base directory and ${build.dir} is the publish directory." /> | |
</target> | |
<!-- Removes the old directory --> | |
<target name='build2.removeDir'> | |
<delete dir='${build.dir}' /> | |
</target> | |
<!-- Builds a new directory --> | |
<target name='build2.createDir'> | |
<mkdir dir='${base.dir}Publish'/> | |
</target> | |
<target name='copy.all'> | |
<copy todir="${build.dir}"> | |
<fileset dir="${base.dir}" > | |
<exclude name="Publish" /> | |
<exclude name="build/" /> | |
</fileset> | |
</copy> | |
</target> | |
<target name='minify.loop'> | |
<!-- The target command tells it which command it should run on. --> | |
<foreach param="filename" absparam="absfilename" target="minify.files"> | |
<fileset dir="${build.dir}" includes="**/*.css" /> | |
</foreach> | |
</target> | |
<target name='minify.files'> | |
<exec command="java -jar yuicompressor-2.4.8.jar ${absfilename} -o ${absfilename}" /> | |
</target> | |
<target name='main' depends='build2.sayMessage, build2.removeDir, build2.createDir'> | |
<echo message="We deleted the old folder, added a new one, and then said hello"/> | |
</target> | |
<property name="svnpath" value="C:\Program Files\TortoiseSVN\bin\svn.exe" /> | |
<property name="username" value="" /> | |
<property name="repo" value="https://main-pc/svn/Presentation/" /> | |
<property name="livedir" value="C:\Apache24\htdocs\temp" /> | |
<property name="commit.message" value="First commit to Database." /> | |
<property name="password" value="" /> | |
<!-- <target name="password"> | |
<propertyprompt | |
propertyName = "password" | |
promptText = "Enter svn password" | |
/> | |
<if> | |
<equals arg1="${password}" arg2="" trim="true" /> | |
<then> | |
<fail message="Password required" /> | |
</then> | |
</if> | |
</target> | |
--> | |
<target name="svncommit"> | |
<svncommit | |
svnpath = "${svnpath}" | |
username = "${username}" | |
password = "${password}" | |
nocache = "true" | |
workingcopy = "${livedir}" | |
message = "${commit.message}" | |
/> | |
</target> | |
<target name="build" depends="svncommit" /> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment