Set Python plugin version from PyCharm ApplicationInfo.xml

This commit is contained in:
Dmitry Trofimov
2015-01-28 01:07:39 +01:00
parent 15189702c4
commit 477e65e659
2 changed files with 14 additions and 1 deletions

View File

@@ -172,6 +172,19 @@ target(name: "compile", description: "Compile module python") {
fileset(file: "${pluginHome}/build/python-plugin-dependencies.xml")
}
// set version to PyCharm current version from ApplicationInfo.xml
ant.loadfile(property: "appInfo", srcFile: "${home}/python/resources/idea/PyCharmCoreApplicationInfo.xml") {
}
major = ("${appInfo}" =~ /major\s*=\s*\"([^"])\"/)[0][1]
minor = ("${appInfo}" =~ /minor\s*=\s*\"([^"])\"/)[0][1]
ant.replaceregexp(file: path,
match: "@@PYCHARM_VERSION@@",
replace: "${major}.${minor}")
// set since-build to the current idea build number
ant.replace(file: "${classesDir}/META-INF/plugin.xml") {
replacefilter(token: "@@BUILD_NUMBER@@", value: "${buildNumber}")
}

View File

@@ -16,7 +16,7 @@ The Python plug-in provides smart editing for Python scripts. The feature set of
]]></description>
<!-- <PyCharm version> <Build number> (<Beta>|<EAP>|<RC>)? -->
<version>4.1 @@BUILD_NUMBER@@ EAP</version>
<version>@@PYCHARM_VERSION@@ @@BUILD_NUMBER@@ EAP</version>
<depends>com.intellij.modules.java</depends>