-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
53 lines (42 loc) · 2.74 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
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
<!-- for some information on what you could do (e.g. targets to override). -->
<!-- If you delete this file and reopen the project it will be recreated. -->
<project name="netbeanslab.explore.from.here" default="all" basedir=".">
<description>Builds, tests, and runs the project netbeanslab.explore.from.here.</description>
<import file="nbproject/build-impl.xml"/>
<target name="all" depends="-nbm-spec-version,postprocessing"/>
<target name="postprocessing">
<property name="auc_file" value="./efhnbm_autoupdate_center.xml"></property>
<property name="temp_file" value="./temp/module.properties"></property>
<unjar src="build/${code.name.base.dashes}.nbm" dest="temp"/>
<xslt basedir="." in="temp/Info/info.xml" out="${auc_file}" style="create_autoupdate.xsl" />
<replace file='${auc_file}' token='"module_updates"' value='"http://www.netbeans.org/dtds/autoupdate-catalog-2_3.dtd"'/>
<tstamp>
<format property="DDMMYYYY" pattern="dd/MM/yyyy"/>
</tstamp>
<replace file='${auc_file}' token='$DDMMYYYY' value='${DDMMYYYY}'/>
<xslt basedir="." in="build/cluster/config/Modules/${code.name.base.dashes}.xml" out="${temp_file}" style="version_to_props.xsl" />
<property file="${temp_file}"/>
<property name="download.url" value="https://github.com/netbeanslab/netbeans-explore-from-here/releases/download/v${spec.version}/${code.name.base.dashes}-${spec.version}.nbm"/>
<replace file='${auc_file}' token='distribution=""' value='distribution="${download.url}"'/>
<copy file="build/${code.name.base.dashes}.nbm" tofile="releases/${code.name.base.dashes}-${spec.version}.nbm" overwrite="true"/>
<length file="build/${code.name.base.dashes}.nbm" property="nbm_size"/>
<replace file='${auc_file}' token='downloadsize="0"' value='downloadsize="${nbm_size}"'/>
<delete dir="temp" />
</target>
<target name="-nbm-spec-version" depends="nbm">
<loadfile property="implementation.version" srcFile="manifest.mf">
<filterchain>
<tokenfilter>
<containsregex pattern="OpenIDE-Module-Implementation-Version:[ \t]*" replace="" flags="i"/>
</tokenfilter>
<striplinebreaks />
</filterchain>
</loadfile>
<property name="spec.version" value="${spec.version.base}.${implementation.version}"/>
</target>
<target name="nbm-with-version" depends="-nbm-spec-version">
<move file="build/${code.name.base.dashes}.nbm" tofile="build/${code.name.base.dashes}-${spec.version}.nbm"/>
</target>
</project>