-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
41 lines (40 loc) · 1.15 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
<?xml version="1.0"?>
<project name="GitHub Content WordPress Plugin" basedir=".">
<property environment="env" />
<property name="src.dir" value="src" />
<property name="dist.dir" value="dist" />
<property name="plugin.dir" value="getgit" />
<property
name="plugin-install-location.dir"
value="${env.WORDPRESS_PLUGIN_DEPLOY_DIR}" />
<property
name="deploy.dir"
value="${plugin-install-location.dir}/${plugin.dir}" />
<target name="deploy-clean">
<echo message="Removing plugin deploy directory..." />
<delete dir="${deploy.dir}" />
</target>
<target name="deploy-copy">
<echo message="Deploying to: ${deploy.dir}" />
<mkdir dir="${deploy.dir}" />
<copy
todir="${deploy.dir}"
verbose="true">
<fileset dir="${src.dir}">
<exclude name="**/.git" />
</fileset>
</copy>
</target>
<target name="deploy" depends="deploy-clean, deploy-copy"></target>
<target name="dist-clean">
<delete dir="${dist.dir}"/>
</target>
<target name="dist-build" depends="dist-clean">
<mkdir dir="${dist.dir}"/>
<zip destfile="${dist.dir}/${plugin.dir}.zip">
<zipfileset
dir="${src.dir}"
prefix="${plugin.dir}"/>
</zip>
</target>
</project>