Skip to content

Commit

Permalink
[JetBrains] Update Platform Version from JetBrains Gateway Plugin (St…
Browse files Browse the repository at this point in the history
…able) (#20201)

* Update Platform Version of JetBrains Gateway Plugin (Stable) to

* Fix and update GHA script

* fixup

---------

Co-authored-by: Robo Quat <[email protected]>
  • Loading branch information
mustard-mh and roboquat authored Sep 12, 2024
1 parent 3037306 commit 9070e11
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
2 changes: 2 additions & 0 deletions components/ide/gha-update-image/index-jb-platform-update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ platformVersion={{platformVersion}}
xmlName: "Gateway",
xmlChannels: ["GW-EAP-licensing-EAP", "GW-RELEASE-licensing-RELEASE", "GW-EAP-licensing-RELEASE"],
useXml: true,
useHumanreadableVersion: true,
gradlePropertiesPath: path.resolve(
pathToProjectRoot,
"components/ide/jetbrains/gateway-plugin/gradle-latest.properties",
Expand All @@ -68,6 +69,7 @@ platformVersion={{platformVersion}}
xmlName: "Gateway",
xmlChannels: ["GW-RELEASE-licensing-RELEASE"],
useXml: true,
useHumanreadableVersion: true,
gradlePropertiesPath: path.resolve(
pathToProjectRoot,
"components/ide/jetbrains/gateway-plugin/gradle-stable.properties",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ interface TargetInfo {
xmlName: string;
xmlChannels: string[];
useXml: boolean;
useHumanreadableVersion: boolean;
gradlePropertiesPath: string;
gradlePropertiesTemplate: string;
}
Expand Down Expand Up @@ -41,7 +42,8 @@ const productReleaseZod = z.record(
);

async function fetchLatestVersionFromProductReleases(info: TargetInfo) {
const { productCode, productType, useXml } = info;
const { productCode, productType, useXml, useHumanreadableVersion } = info;
// https://data.services.jetbrains.com/products/releases?code=GW&type=eap,rc,release&platform=linux
const url = `https://data.services.jetbrains.com/products/releases?code=${productCode}&type=${productType}&platform=linux`;
const response = await axios.get(url);
const data = productReleaseZod.parse(response.data);
Expand All @@ -55,11 +57,12 @@ async function fetchLatestVersionFromProductReleases(info: TargetInfo) {
throw new Error(`Invalid build version ${build}`);
}
const latestPlatformVersion = !useXml ? `${buildSem.major}.${buildSem.minor}-EAP-CANDIDATE-SNAPSHOT` : build;
const latestHumanreadablePlatfromVersion = latestBuild.version;
return {
pluginSinceBuild: `${buildSem.major}.${buildSem.minor}`,
pluginUntilBuild: `${buildSem.major}.*`,
pluginVerifierIdeVersions: latestBuild.majorVersion,
platformVersion: latestPlatformVersion,
platformVersion: useHumanreadableVersion ? latestHumanreadablePlatfromVersion : latestPlatformVersion,
};
}

Expand Down
8 changes: 4 additions & 4 deletions components/ide/jetbrains/gateway-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ plugins {
// Kotlin support - check the latest version at https://plugins.gradle.org/plugin/org.jetbrains.kotlin.jvm
id("org.jetbrains.kotlin.jvm") version "2.0.0"
// gradle-intellij-plugin - read more: https://github.com/JetBrains/gradle-intellij-plugin
id("org.jetbrains.intellij.platform") version "2.0.0"
// id("org.jetbrains.intellij.platform.migration") version "2.0.0-beta8"
id("org.jetbrains.intellij.platform") version "2.0.1"
// id("org.jetbrains.intellij.platform.migration") version "2.0.1"
// gradle-changelog-plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
id("org.jetbrains.changelog") version "1.1.2"
// detekt linter - read more: https://detekt.github.io/detekt/gradle.html
Expand Down Expand Up @@ -72,9 +72,9 @@ dependencies {

dependencies {
intellijPlatform {
// https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html#target-platforms
// https://www.jetbrains.com/updates/updates.xml
create(IntelliJPlatformType.Gateway, properties("platformVersion"))
// create(IntelliJPlatformType.Gateway)
bundledPlugins(properties("platformBundledPlugins").split(',').map{ it.trim() })
}
}
Expand Down Expand Up @@ -106,7 +106,7 @@ intellijPlatform {
}
}

verifyPlugin {
pluginVerification {
ides {
properties("pluginVerifierIdeVersions").split(',').map(String::trim).forEach { version ->
ide(IntelliJPlatformType.Gateway, version)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ pluginUntilBuild=242.*
# Plugin Verifier integration -> https://github.com/JetBrains/gradle-intellij-plugin#plugin-verifier-dsl
# See https://jb.gg/intellij-platform-builds-list for available build versions.
pluginVerifierIdeVersions=2024.2
# Version from "com.jetbrains.gateway" which can be found at https://www.jetbrains.com/updates/updates.xml
platformVersion=242.20224.368
# Version from "com.jetbrains.gateway" which can be found at https://www.jetbrains.com/updates/updates.xml or exec `./gradlew printProductsReleases`
platformVersion=2024.2.1

0 comments on commit 9070e11

Please sign in to comment.