-
Notifications
You must be signed in to change notification settings - Fork 1
/
version.xml
48 lines (39 loc) · 1.78 KB
/
version.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
<?xml version="1.0" encoding="UTF-8"?>
<project name="project" default="current-number">
<property file="project.properties"/>
<property name="build.number" value="${build.major.number}.${build.minor.number}.${build.revision.number}"/>
<target name="current-number">
<echo>Current build number:${build.number}</echo>
</target>
<target name="compile">
<antcall target="revision"></antcall>
</target>
<target name="dist">
<antcall target="minor"></antcall>
</target>
<target name="revision">
<propertyfile file="build_info.properties">
<entry key="build.revision.number" type="int" operation="+" value="1" pattern="00"/>
</propertyfile>
</target>
<target name="minor">
<propertyfile file="build_info.properties">
<entry key="build.minor.number" type="int" operation="+" value="1" pattern="00"/>
<entry key="build.revision.number" type="int" value="0" pattern="00"/>
</propertyfile>
</target>
<target name="major">
<propertyfile file="build_info.properties">
<entry key="build.major.number" type="int" operation="+" value="1" pattern="00"/>
<entry key="build.minor.number" type="int" value="0" pattern="00"/>
<entry key="build.revision.number" type="int" value="0" pattern="00"/>
</propertyfile>
</target>
<target name="all">
<propertyfile file="build_info.properties">
<entry key="build.major.number" type="int" operation="+" value="1" pattern="00"/>
<entry key="build.minor.number" type="int" operation="+" value="1" pattern="00"/>
<entry key="build.revision.number" type="int" operation="+" value="1" pattern="00"/>
</propertyfile>
</target>
</project>