/
help-build.xml
63 lines (63 loc) · 3.06 KB
/
help-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
<project name="help-build" default="nothing">
<property name="executable.dir" value="/executable" />
<property name="data.dir" value="/data" />
<target name="nothing">
<echo>Doing nothing...</echo>
</target>
<target name="repack.sources">
<fail unless="input.dir" message="Property input.dir unspecified." />
<fail unless="output.dir" message="Property output.dir unspecified." />
<copy todir="${output.dir}">
<mapper type="regexp" from="(.*)(/|\\)(src|sources|source|source_gen|tests)(/|\\)(.*)" to="\5" />
<fileset dir="${input.dir}" />
</copy>
</target>
<target name="append.mps.version">
<property name="build.number.file" value="${input.dir}/build.number" />
<property name="prefix" value="jetbrains.mps." />
<fail unless="mps_home" message="Property mps_home unspecified." />
<fail unless="output.dir" message="Property output.dir unspecified." />
<fail unless="input.dir" message="Property input.dir unspecified." />
<loadfile srcfile="${mps_home}/build.number" property="mps.buildinfo">
<filterchain>
<prefixlines prefix="${prefix}" />
</filterchain>
</loadfile>
<echo file="${build.number.file}">${mps.buildinfo}</echo>
<copy file="${build.number.file}" todir="${output.dir}" />
</target>
<target name="append.idea.version">
<property name="build.number.file" value="${input.dir}/build.number" />
<fail unless="mps_home" message="Property mps_home unspecified." />
<fail unless="input.dir" message="Property input.dir unspecified." />
<fail unless="output.dir" message="Property output.dir unspecified." />
<property file="${mps_home}/build.number" prefix="repo" />
<echo file="${build.number.file}" append="true">${line.separator}idea.platform.build.number=${repo.idea.platform.build.number}</echo>
<copy file="${build.number.file}" todir="${output.dir}" />
</target>
<target name="pack.mps.src">
<property name="tmpdir" value="${java.io.tmpdir}/MPS.src" />
<fail unless="deploy.dir" message="Property deploy.dir unspecified." />
<fail unless="build.number" message="Property build.number unspecified." />
<fail unless="output.dir" message="Property output.dir unspecified." />
<mkdir dir="${tmpdir}" />
<zip destfile="${output.dir}/MPS-${build.number}-src.zip" filesonly="true">
<zipfileset dir="${basedir}" prefix="MPS">
<exclude name="${deploy.dir}/**" />
<exclude name="lib/jetbrains-ideframework/idea-platform-src.zip" />
<exclude name="lib/jetbrains-ideframework/idea-external-src.zip" />
<exclude name="**/*.class" />
<exclude name="**/*.bdp" />
<exclude name="**/*.pvk" />
<exclude name="**/*.spc" />
<exclude name="**/*.pw" />
<exclude name="**/sign/**" />
<exclude name="system/**" />
<exclude name="**/*.hprof" />
<exclude name="integrationBuild*" />
</zipfileset>
<zipfileset file="lib/jetbrains-ideframework/idea-external-src.zip" prefix="MPS/lib/jetbrains-ideframework" />
</zip>
<delete dir="${tmpdir}" />
</target>
</project>