-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
executable file
·78 lines (63 loc) · 2.26 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
<?xml version="1.0" ?>
<project name="FuelPHP" default="help">
<property name="basedir" value="${project.basedir}" />
<property name="builddir" value="${basedir}/build" />
<property name="branch" value="1.1/develop" />
<property name="tag" value="v1.1" />
<property name="submodules" value="fuel/core,fuel/packages/auth,fuel/packages/email,fuel/packages/oil,fuel/packages/orm,fuel/packages/parser" />
<target name="help">
<echo message="phing clean Clean all previous builds"/>
<echo message="phing dist Build a release .zip"/>
</target>
<target name="clean">
<delete dir="${builddir}"/>
</target>
<target name="warn">
<echo message="WARNING! This will remove any modifications that are not committed." />
<input propertyName="continue" defaultValue="n" validArgs="Y,n" promptChar=":">Do you want to continue? </input>
<if>
<equals arg1="${continue}" arg2="n" />
<then>
<fail message="Abandoning build." />
</then>
</if>
</target>
<target name="prepare">
<echo msg="Making directory ./build" />
<mkdir dir="./build" />
</target>
<target name="prepare-repo">
<if>
<not>
<isset property="release-tag"/>
</not>
<then>
<propertyprompt propertyName="release-tag" defaultValue="${tag}" promptText="Tag name:" />
</then>
</if>
<exec command="git fetch" dir="." passthru="true" />
<exec command="git reset --hard HEAD" dir="." passthru="true" />
<exec command="git checkout ${release-tag}" dir="." passthru="true" />
<exec command="git submodule update --init" dir="." passthru="true" />
</target>
<!-- Build a release .zip -->
<target name="dist" depends="warn,prepare,prepare-repo">
<zip destfile="${builddir}/fuelphp-${release-tag}.zip" prefix="fuelphp-${release-tag}/">
<fileset dir="${basedir}">
<include name="**/**"/>
<exclude name="*.zip" />
<exclude name="build/**" />
<exclude name="build.xml" />
<exclude name="phpunit.xml" />
<exclude name="CONTRIBUTING.md" />
<exclude name="TESTING.md" />
<exclude name="fuel/app/cache/*/**" />
<exclude name="fuel/app/logs/*/**" />
<exclude name="fuel/app/tmp/*/**" />
<exclude name=".DS_Store" />
<exclude name="**/.git/**" />
<exclude name="**/.git*" />
</fileset>
</zip>
</target>
</project>