IDEA-128621 auto set version and since-build

This commit is contained in:
Vladimir Krivosheev
2015-08-27 10:01:18 +02:00
parent ea70818b49
commit 57ef4c2df2
2 changed files with 11 additions and 2 deletions
+11
View File
@@ -666,6 +666,15 @@ public def layoutCommunityPlugins(String home, boolean maySkipAndroidPlugin = fa
}
}
def setPluginVersionAndSince(String moduleName, String version) {
def file = new File(projectBuilder.moduleOutput(findModule(moduleName)) + "/META-INF/plugin.xml")
if (file.isFile()) {
def text = file.text
if (!text.contains("<version>")) {
file.text = text.replace("</id>", "</id>\n <version>${version}</version>\n <idea-version since-build=\"${version}\" until-build=\"${version}\"/>\n")
}
}
}
def layoutPlugin(String moduleName) {
layoutPlugin(moduleName, moduleName, {})
@@ -697,6 +706,8 @@ def layoutPlugin(String pluginName, String moduleName, String jarName, Closure c
return
}
setPluginVersionAndSince(moduleName, requireProperty("buildNumber", requireProperty("build.number", snapshot)))
dir(pluginName) {
dir("lib") {
jar("${jarName}.jar") {
@@ -5,8 +5,6 @@
<p>Supports sharing settings between installations of IntelliJ Platform based products used by the same developer (or team) on different computers.</p>
<p>Synchronization is performed automatically after successful completion of "Update Project" or "Push" actions. Also you can do sync using VCS -> Sync Settings.</p>
<p>See <a href="https://github.com/develar/settings-repository">project page</a> for more info.</p>]]></description>
<version>999.999</version>
<idea-version since-build="142.4255" until-build="143.0"/>
<vendor>JetBrains</vendor>
<!-- otherwise plugin will be not loaded in tests -->