forked from cweiske/phpfarm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
90 lines (76 loc) · 3.02 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
<?xml version="1.0" encoding="utf-8"?>
<project name="phpfarm" default="zip" basedir=".">
<!--
phpfarm phing build file.
This file is the one-stop tool for all phpfarm administrative tasks
-->
<property file="build.properties" />
<property name="version-m" value="0.1" />
<property name="version" value="0.1.1-X" />
<property name="stability" value="beta" />
<property name="zipfile" value="${phing.project.name}-${version}.tar.bz2" />
<property name="distfile" value="dist/${zipfile}" />
<property name="sfproject" value="phpfarm" />
<property name="sffilepath" value="p/ph/phpfarm/" />
<fileset id="fs.zip" dir=".">
<include name="inst/bin/.keep-phpfarm"/>
<include name="src/bzips/.keep-phpfarm"/>
<include name="src/compile.sh"/>
<include name="src/default-custom-php.ini"/>
<include name="src/options.sh"/>
<include name="src/pyrus.sh"/>
<include name="README"/>
<include name="README.html"/>
</fileset>
<fileset id="fs.doc" dir=".">
<include name="README"/>
</fileset>
<target name="zip" depends="check,build-docs"
description="Create release file"
>
<echo msg="Creating distribution file ${phing.project.name} ${version}"/>
<delete file="${distfile}" failonerror="false"/>
<tar destfile="${distfile}"
compression="bzip2"
prefix="${phing.project.name}-${version}/">
<fileset refid="fs.zip"/>
</tar>
</target>
<target name="build-docs" description="render documentation">
<rST format="html" uptodate="true">
<fileset refid="fs.doc"/>
</rST>
</target>
<!--
/home/frs/project/s/se/semanticscuttle/SemanticScuttle/v0.94/
/home/frs/project/s/se/semanticscuttle/SemanticScuttle/v0.94/SemanticScuttle-v0.94.zip
/home/frs/project/s/se/semanticscuttle/SemanticScuttle/v0.94/SemanticScuttle-v0.94.1.zip
https://sourceforge.net/apps/trac/sourceforge/wiki/Release%20files%20for%20download
-->
<target name="deploy-sf" depends="check,zip"
description="Upload release to sourceforge"
>
<delete dir="dist/deploy-sf" /><!-- make empty -->
<mkdir dir="dist/deploy-sf" />
<mkdir dir="dist/deploy-sf/v${version-m}" />
<copy file="${distfile}" tofile="dist/deploy-sf/v${version-m}/${zipfile}"/>
<!-- test
<exec command="rsync -av dist/deploy-sf/ /tmp/test/" escape="false" />
-->
<exec
command="rsync -av -e ssh dist/deploy-sf/ ${sfuser},${sfproject}@frs.sourceforge.net:/home/frs/project/${sffilepath}/${sfproject}/"
escape="false" checkreturn="false"
/>
<!-- rsync always returns code 23 on sourceforge releases, so we
can't check return values -->
</target>
<target name="check"
description="Check variables"
>
<fail unless="version" message="Version not defined!" />
<fail unless="sfuser" message="Sourceforge username not defined!" />
<fail unless="sfproject" message="Sourceforge project name not defined!" />
<fail unless="sffilepath" message="Sourceforge project file path not defined!" />
<mkdir dir="dist" />
</target>
</project>