-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
62 lines (57 loc) · 2.37 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
<?xml version="1.0"?>
<!-- build.xml: Ant build file for the PokemonGoIV project -->
<!-- by imacat <[email protected]>, 2016-09-09 -->
<project name="pokemongoiv" default="help" basedir=".">
<!-- property: The build variables -->
<loadfile property="project.version" srcfile="${basedir}/VERSION">
<filterchain>
<striplinebreaks />
</filterchain>
</loadfile>
<property name="proj.name.basic" value="PokemonGoIV" />
<property name="src.dir" value="${basedir}/oxt" />
<property name="build.dir" value="build" />
<property name="dist.build.dir" value="${build.dir}/dist" />
<property name="dist.dir" value="${basedir}" />
<property name="src.build.dir" value="${build.dir}/${proj.name.basic}" />
<!-- help: Display the help information -->
<target name="help">
<echo level="info" message="Available targets:" />
<echo level="info" message=" oxt: Create the extension ${proj.name.basic}.oxt" />
<echo level="info" message=" dist: Create the pacakge distribution as ${ant.project.name}-${project.version}.zip" />
<echo level="info" message=" clean: Clean-up the build files" />
<echo level="info" message=" help: Display this help" />
</target>
<!-- oxt: Create the extension -->
<target name="oxt">
<copy todir="${src.build.dir}"
preservelastmodified="true">
<fileset dir="${src.dir}" />
</copy>
<replace file="${src.build.dir}/description.xml"
token="@VERSION@" value="${project.version}" />
<zip destfile="${basedir}/${proj.name.basic}.oxt"
basedir="${src.build.dir}" />
</target>
<!-- -distdir: Create the distribution directory -->
<target name="-distdir" depends="oxt">
<copy todir="${dist.build.dir}/${ant.project.name}-${project.version}"
preservelastmodified="true">
<fileset dir="${basedir}"
excludes="${build.dir}/ ${ant.project.name}-*.zip excludes/" />
</copy>
</target>
<!-- dist: Create the pacakge distribution -->
<target name="dist" depends="-distdir">
<zip destfile="${dist.dir}/${ant.project.name}-${project.version}.zip"
basedir="${dist.build.dir}" />
</target>
<!-- clean: Clean-up the build files -->
<target name="clean">
<delete dir="${build.dir}" />
<delete verbose="true">
<fileset file="${dist.dir}/${ant.project.name}-*.zip*" />
<fileset file="${basedir}/${proj.name.basic}.oxt" />
</delete>
</target>
</project>