forked from go-lang-plugin-org/go-lang-idea-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpatch-plugin-version.xml
30 lines (25 loc) · 1005 Bytes
/
patch-plugin-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
<project name="Plugin version patcher" default="patch-version" basedir=".">
<property name="unzip.path" value="${artifact.output.path}/intellij-go-tmp"/>
<target name="checkVariables">
<condition property="${variables.are.set}">
<and>
<isset property="build.number"/>
<isset property="artifact.output.path"/>
</and>
</condition>
</target>
<target name="clean">
<delete dir="${unzip.path}" failonerror="false"/>
</target>
<target name="patch-version" depends="checkVariables,clean" if="${variables.are.set}">
<unzip dest="${unzip.path}">
<fileset dir="${artifact.output.path}" includes="intellij-go.jar"/>
</unzip>
<replace file="${unzip.path}/META-INF/plugin.xml"
token="<version>1.0</version>"
value="<version>0.9.${build.number}</version>"/>
<zip destfile="${artifact.output.path}/intellij-go.jar">
<fileset dir="${unzip.path}" includes="**"/>
</zip>
</target>
</project>