-
Notifications
You must be signed in to change notification settings - Fork 5
/
update-version.xml
66 lines (53 loc) · 2.8 KB
/
update-version.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
<?xml version="1.0"?>
<project name="Drools" basedir="." default="usage">
<target name="usage">
<echo>ant -f update-version.xml -Dcurrent="3.1.0.M1" -Dnew="4.0.0.SNAPSHOT" updateVersion</echo>
</target>
<target name="updateVersion" depends="checkProps, error" unless="propsNotSet">
<replaceregexp match="<version>${current}</version>"
replace="<version>${new}</version>"
byline="true">
<fileset dir="." includes="*pom.xml, drools-*/pom.xml, drools-examples/drools-insurance/pom.xml,
drools-docs/pom.xml, drools-docs/drools-*/pom.xml"/>
</replaceregexp>
<replaceregexp match="Bundle-Version: ${current}"
replace="Bundle-Version: ${new}"
byline="true">
<fileset dir="drools-eclipse" includes="drools-eclipse-plugin/META-INF/MANIFEST.MF, drools-eclipse-test/META-INF/MANIFEST.MF"/>
</replaceregexp>
<replaceregexp match="Fragment-Host: org.drools.eclipse;bundle-version="${current}""
replace="Fragment-Host: org.drools.eclipse;bundle-version="${new}""
byline="true">
<fileset dir="drools-eclipse" includes="drools-eclipse-plugin/META-INF/MANIFEST.MF, drools-eclipse-test/META-INF/MANIFEST.MF"/>
</replaceregexp>
<replaceregexp match="version="${current}""
replace="version="${new}""
byline="true">
<fileset dir="drools-eclipse" includes="drools-eclipse-feature/feature.xml, drools-eclipse-test-feature/feature.xml"/>
</replaceregexp>
<replaceregexp file="drools-eclipse/build.properties"
match="droolsVersion=${current}"
replace="droolsVersion=${new}"
byline="true" />
<replaceregexp match="<releaseinfo>${current}</releaseinfo>"
replace="<releaseinfo>${new}</releaseinfo>"
byline="true">
<fileset dir="drools-docs" includes="drools-docs-*/en/master.xml"/>
</replaceregexp>
</target>
<target name="error" if="propsNotSet">
<echo>current and new are not set</echo>
</target>
<target name="checkProps">
<condition property="propsSet" value="true">
<not>
<isset property="current" />
</not>
</condition>
<condition property="propsNotSet" value="true">
<not>
<isset property="new" />
</not>
</condition>
</target>
</project>