Skip to content

Commit 9070e11

Browse files
mustard-mhroboquat
andauthored
[JetBrains] Update Platform Version from JetBrains Gateway Plugin (Stable) (#20201)
* Update Platform Version of JetBrains Gateway Plugin (Stable) to * Fix and update GHA script * fixup --------- Co-authored-by: Robo Quat <[email protected]>
1 parent 3037306 commit 9070e11

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

components/ide/gha-update-image/index-jb-platform-update.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ platformVersion={{platformVersion}}
4343
xmlName: "Gateway",
4444
xmlChannels: ["GW-EAP-licensing-EAP", "GW-RELEASE-licensing-RELEASE", "GW-EAP-licensing-RELEASE"],
4545
useXml: true,
46+
useHumanreadableVersion: true,
4647
gradlePropertiesPath: path.resolve(
4748
pathToProjectRoot,
4849
"components/ide/jetbrains/gateway-plugin/gradle-latest.properties",
@@ -68,6 +69,7 @@ platformVersion={{platformVersion}}
6869
xmlName: "Gateway",
6970
xmlChannels: ["GW-RELEASE-licensing-RELEASE"],
7071
useXml: true,
72+
useHumanreadableVersion: true,
7173
gradlePropertiesPath: path.resolve(
7274
pathToProjectRoot,
7375
"components/ide/jetbrains/gateway-plugin/gradle-stable.properties",

components/ide/gha-update-image/lib/jb-update-platform-version.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ interface TargetInfo {
1212
xmlName: string;
1313
xmlChannels: string[];
1414
useXml: boolean;
15+
useHumanreadableVersion: boolean;
1516
gradlePropertiesPath: string;
1617
gradlePropertiesTemplate: string;
1718
}
@@ -41,7 +42,8 @@ const productReleaseZod = z.record(
4142
);
4243

4344
async function fetchLatestVersionFromProductReleases(info: TargetInfo) {
44-
const { productCode, productType, useXml } = info;
45+
const { productCode, productType, useXml, useHumanreadableVersion } = info;
46+
// https://data.services.jetbrains.com/products/releases?code=GW&type=eap,rc,release&platform=linux
4547
const url = `https://data.services.jetbrains.com/products/releases?code=${productCode}&type=${productType}&platform=linux`;
4648
const response = await axios.get(url);
4749
const data = productReleaseZod.parse(response.data);
@@ -55,11 +57,12 @@ async function fetchLatestVersionFromProductReleases(info: TargetInfo) {
5557
throw new Error(`Invalid build version ${build}`);
5658
}
5759
const latestPlatformVersion = !useXml ? `${buildSem.major}.${buildSem.minor}-EAP-CANDIDATE-SNAPSHOT` : build;
60+
const latestHumanreadablePlatfromVersion = latestBuild.version;
5861
return {
5962
pluginSinceBuild: `${buildSem.major}.${buildSem.minor}`,
6063
pluginUntilBuild: `${buildSem.major}.*`,
6164
pluginVerifierIdeVersions: latestBuild.majorVersion,
62-
platformVersion: latestPlatformVersion,
65+
platformVersion: useHumanreadableVersion ? latestHumanreadablePlatfromVersion : latestPlatformVersion,
6366
};
6467
}
6568

components/ide/jetbrains/gateway-plugin/build.gradle.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ plugins {
1616
// Kotlin support - check the latest version at https://plugins.gradle.org/plugin/org.jetbrains.kotlin.jvm
1717
id("org.jetbrains.kotlin.jvm") version "2.0.0"
1818
// gradle-intellij-plugin - read more: https://github.com/JetBrains/gradle-intellij-plugin
19-
id("org.jetbrains.intellij.platform") version "2.0.0"
20-
// id("org.jetbrains.intellij.platform.migration") version "2.0.0-beta8"
19+
id("org.jetbrains.intellij.platform") version "2.0.1"
20+
// id("org.jetbrains.intellij.platform.migration") version "2.0.1"
2121
// gradle-changelog-plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
2222
id("org.jetbrains.changelog") version "1.1.2"
2323
// detekt linter - read more: https://detekt.github.io/detekt/gradle.html
@@ -72,9 +72,9 @@ dependencies {
7272

7373
dependencies {
7474
intellijPlatform {
75+
// https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html#target-platforms
7576
// https://www.jetbrains.com/updates/updates.xml
7677
create(IntelliJPlatformType.Gateway, properties("platformVersion"))
77-
// create(IntelliJPlatformType.Gateway)
7878
bundledPlugins(properties("platformBundledPlugins").split(',').map{ it.trim() })
7979
}
8080
}
@@ -106,7 +106,7 @@ intellijPlatform {
106106
}
107107
}
108108

109-
verifyPlugin {
109+
pluginVerification {
110110
ides {
111111
properties("pluginVerifierIdeVersions").split(',').map(String::trim).forEach { version ->
112112
ide(IntelliJPlatformType.Gateway, version)

components/ide/jetbrains/gateway-plugin/gradle-stable.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ pluginUntilBuild=242.*
77
# Plugin Verifier integration -> https://github.com/JetBrains/gradle-intellij-plugin#plugin-verifier-dsl
88
# See https://jb.gg/intellij-platform-builds-list for available build versions.
99
pluginVerifierIdeVersions=2024.2
10-
# Version from "com.jetbrains.gateway" which can be found at https://www.jetbrains.com/updates/updates.xml
11-
platformVersion=242.20224.368
10+
# Version from "com.jetbrains.gateway" which can be found at https://www.jetbrains.com/updates/updates.xml or exec `./gradlew printProductsReleases`
11+
platformVersion=2024.2.1

0 commit comments

Comments
 (0)