forked from riotfamily/riot-skeleton
/
create-skeleton.xml
48 lines (39 loc) · 1.46 KB
/
create-skeleton.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
<project name="create-skeleton" default="zip">
<property name="build.dir" value="build" />
<property name="archive.dir" value="${build.dir}/archive" />
<target name="zip">
<condition property="skeleton-or-release">
<or>
<isset property="skeleton" />
<isset property="release" />
</or>
</condition>
<fail unless="skeleton-or-release" message="Either of the properties 'release' or 'skeleton' must be set." />
<property name="skeleton" value="skeleton-${release}" />
<delete dir="${archive.dir}" />
<mkdir dir="${archive.dir}" />
<copy todir="${archive.dir}">
<fileset dir=".">
<exclude name="create-skeleton.xml" />
<exclude name=".classpath" />
<exclude name=".project" />
<exclude name="src/*" />
<exclude name="lib/*" />
<exclude name="build/**" />
<exclude name="webapp/WEB-INF/classes/**" />
<exclude name="webapp/WEB-INF/lib/**" />
</fileset>
</copy>
<replace dir="${archive.dir}" token="riot-skeleton" value="@project-name@">
<include name="build.xml" />
<include name="ivy.xml" />
<include name=".settings/org.eclipse.wst.common.component" />
</replace>
<zip destfile="${build.dir}/${skeleton}.zip" basedir="${archive.dir}" />
</target>
<target name="upload" depends="zip">
<scp file="${build.dir}/${skeleton}.zip"
todir="${user.name}@riotfamily.org:/var/www/riotfamily.org/www/htdocs/setup"
keyfile="${user.home}/.ssh/id_rsa" passphrase="" trust="true" />
</target>
</project>