-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathbuild.xml
42 lines (34 loc) · 1.43 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
<project name="forumng-stable" basedir="." default="zip">
<description>
Builds the contrib version of ForummNG stable.
</description>
<!-- Target for zip file -->
<property name="zipfolder" value="${user.home}/Desktop"/>
<!-- File base name -->
<property name="basename" value="forumng"/>
<target name="zip">
<echo message="Update stable branch BEFORE running this script!"/>
<!-- Get the version number from file -->
<loadfile property="versionfile" srcFile="version.php">
<filterchain>
<containsregex
pattern="^.*Stable R([^']+)';.*$"
replace="\1"/>
<striplinebreaks/>
</filterchain>
</loadfile>
<fail unless="versionfile" message="Unable to find version number (did you run this on HEAD by accident?)" />
<!-- Work out full filename -->
<property name="target" value="${zipfolder}/${basename}.${versionfile}.zip"/>
<!-- Build zip file of all files (except this build script and Ant
default excludes, such as source control files) -->
<delete file="${target}" />
<zip destfile="${target}" level="9">
<fileset dir="..">
<include name="forumng/**"/>
<exclude name="forumng/build.xml" />
</fileset>
</zip>
<echo message="Now upload this to..."/>
</target>
</project>