-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.xml
104 lines (90 loc) · 3.47 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<?xml version="1.0" encoding="UTF-8"?>
<project name="Moxie" default="main" xmlns:mx="antlib:org.moxie">
<!--
Build all Moxie projects.
Because we are bootstrapping Moxie (building Moxie with Moxie) we have
to use a traditional, more complex ANT build strategy.
-->
<target name="main">
<!-- Build Toolkit first because other projects use built artifacts -->
<subant buildpath="${basedir}/toolkit" failonerror="true" />
<!-- Build remaining projects -->
<subant buildpath="${basedir}/maxml" failonerror="true" />
<subant buildpath="${basedir}/moxie+ant" failonerror="true" />
<subant buildpath="${basedir}/proxy" failonerror="true" />
<subant buildpath="${basedir}/common" failonerror="true" />
<subant buildpath="${basedir}/site" failonerror="true" />
<!-- Update IntelliJ IDEA .idea folder -->
<taskdef uri="antlib:org.moxie">
<classpath location="${basedir}/toolkit/build/target/moxie.jar" />
</taskdef>
<mx:init />
</target>
<!--
Release a new version and prepare for the next development cycle.
-->
<target name="tagRelease">
<taskdef uri="antlib:org.moxie">
<classpath location="${basedir}/toolkit/build/target/moxie.jar" />
</taskdef>
<mx:init />
<!-- release -->
<property name="dryrun" value="false" />
<mx:version stage="release" dryrun="${dryrun}" />
<property name="project.tag" value="v${project.version}" />
<!-- commit build.moxie & releases.moxie (automatic) -->
<mx:commit showtitle="no">
<message>Prepare ${project.version} release</message>
<tag name="${project.tag}">
<message>${project.name} ${project.version} release</message>
</tag>
</mx:commit>
<!-- create the release process script -->
<mx:if>
<os family="windows" />
<then>
<!-- Windows PowerShell script -->
<!-- set-executionpolicy remotesigned -->
<property name="recipe" value="release_${project.version}.ps1" />
</then>
<else>
<!-- Bash script -->
<property name="recipe" value="release_${project.version}.sh" />
</else>
</mx:if>
<delete file="${recipe}" failonerror="false" quiet="true" verbose="false" />
<!-- Work-around for lack of proper ant property substitution in copy -->
<property name="dollar" value="$"/>
<copy file="release.template" tofile="${recipe}">
<filterset begintoken="${dollar}{" endtoken="}">
<filter token="project.version" value="${project.version}" />
<filter token="project.commitId" value="${project.commitId}" />
<filter token="project.tag" value="${project.tag}" />
</filterset>
</copy>
<chmod file="${recipe}" perm="ugo+rx" />
<!-- next cycle -->
<mx:version stage="snapshot" incrementNumber="incremental" dryrun="${dryrun}" />
<mx:commit showtitle="no">
<message>Reset build identifiers for next development cycle</message>
</mx:commit>
</target>
<!--
Upload artifacts to the remote Maven repository.
-->
<target name="uploadArtifacts">
<taskdef uri="antlib:org.moxie">
<classpath location="${basedir}/toolkit/build/target/moxie.jar" />
</taskdef>
<mx:init />
<mx:ftp server="${ftp.server}" userid="${ftp.user}" password="${ftp.password}"
remotedir="${ftp.maven.dir}" verbose="yes" depends="yes" timediffauto="true"
preservelastmodified="true">
<fileset dir="${basedir}/maven">
<!-- exclude root files -->
<exclude name="*.md" />
<exclude name=".git*" />
</fileset>
</mx:ftp>
</target>
</project>