-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
69 lines (68 loc) · 2.27 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?xml version="1.0" encoding="UTF-8" ?>
<project name="Master Link" default="init" basedir=".">
<property environment="env"/>
<property file="master-link.build.properties"/>
<target name="init">
<echo />
</target>
<target name="checkout">
<echo message="Checking out plugin from SVN to ${dir.svn}" />
<exec executable="svn" dir="${dir.svn}">
<arg line="co http://svn.wp-plugins.org/master-link" />
</exec>
</target>
<target name="dev" depends="compile">
<echo message="Setting up dev environment.." />
<echo message="Copying to ${dir.dev}.." />
<copy todir="${dir.dev}/">
<fileset dir="${dir.src}" excludes="*.coffee,*.sass,*.css.map">
</fileset>
</copy>
</target>
<target name="build" depends="compile">
<echo message="Creating a new build.." />
<copy todir="${dir.build}/">
<fileset dir="${dir.src}" excludes="*.coffee,*.sass,*.css.map">
</fileset>
</copy>
<zip destfile="${dir.build}/master-link.zip">
<zipfileset dir="${dir.src}" prefix="master-link"/>
</zip>
</target>
<target name="compile" depends="clean,compilecoffee,compilesass"/>
<target name="compilecoffee" description="Compiles coffeescript files" depends="cleancoffee">
<apply executable="coffee">
<arg value="-c"/>
<fileset dir="${dir.src}" includes="**/*.coffee"/>
</apply>
</target>
<target name="compilesass" description="Compiles sass files" depends="cleansass">
<apply executable="sass" dest="${dir.src}" verbose="true" force="true" failonerror="true">
<srcfile />
<targetfile />
<fileset dir="${dir.src}" includes="**/*.sass" excludes="**/_*" />
<firstmatchmapper>
<globmapper from="*.sass" to="*.css" />
</firstmatchmapper>
</apply>
</target>
<target name="clean" depends="cleansass,cleancoffee" />
<target name="cleansass">
<delete>
<fileset dir="${dir.src}" includes="*.css *.css.map"/>
</delete>
</target>
<target name="cleancoffee">
<delete>
<fileset dir="${dir.src}" includes="*.js" excludes="JsBarcode.js"/>
</delete>
</target>
<target name="svn-update">
<echo message="Updating....." />
<echo message="Copying to ${dir.svn}.." />
<copy todir="${dir.svn}">
<fileset dir="${dir.latest}">
</fileset>
</copy>
</target>
</project>