-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathbuild.xml
59 lines (53 loc) · 2.44 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
<project name="MyAnimeList Agent" default="package" basedir=".">
<description>
This is the Task to package only the necessary Agent resources into a zip file
and to increase revision, minor and major version and append it to the zip filename
</description>
<property name="version.file" location="${basedir}/VERSION"/>
<macrodef name="load.version.info">
<sequential>
<property file="${version.file}"/>
<checksum file="${version.file}" property="sha1.number" algorithm="SHA" format="CHECKSUM"/>
<echo>Version: ${major.number}.${minor.number}.${build.number}</echo>
<echo>SHA1: ${sha1.number}</echo>
</sequential>
</macrodef>
<target name="00.inc.revision" unless="no.increment.revision">
<propertyfile file="${version.file}">
<entry key="minor.number" default="0" operation="=" pattern="0" type="int"/>
<entry key="major.number" default="0" operation="=" pattern="0" type="int"/>
<entry key="build.number" default="0" operation="+" pattern="0" type="int"/>
</propertyfile>
<load.version.info/>
</target>
<target name="01.inc.minor" unless="no.increment.minor">
<propertyfile file="${version.file}">
<entry key="minor.number" default="0" operation="+" pattern="0" type="int"/>
<entry key="major.number" default="0" operation="=" pattern="0" type="int"/>
<entry key="build.number" value="0" operation="=" type="int"/>
</propertyfile>
<load.version.info/>
</target>
<target name="02.inc.major" >
<propertyfile file="${version.file}">
<entry key="minor.number" value="0" operation="=" pattern="0" type="int"/>
<entry key="major.number" default="0" operation="+" pattern="0" type="int"/>
<entry key="build.number" value="0" operation="=" pattern="0" type="int"/>
</propertyfile>
<load.version.info/>
</target>
<target name="package">
<load.version.info/>
<property file="${version.file}"></property>
<zip destfile="target/MyAnimeList-v${major.number}.${minor.number}.${build.number}.zip">
<zipfileset dir="." prefix="MyAnimeList.bundle">
<include name="**/*.py"/>
<include name="**/*.png"/>
<include name="**/*.json"/>
<include name="**/*.plist"/>
<include name="VERSION"/>
<include name="README.md"/>
</zipfileset>
</zip>
</target>
</project>