From 0f844cd7b8f495869efd98339036bf597f2e1582 Mon Sep 17 00:00:00 2001 From: Robo Quat Date: Wed, 11 Sep 2024 11:00:40 +0000 Subject: [PATCH 1/3] Update Platform Version of JetBrains Gateway Plugin (Stable) to --- .../ide/jetbrains/gateway-plugin/gradle-stable.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/ide/jetbrains/gateway-plugin/gradle-stable.properties b/components/ide/jetbrains/gateway-plugin/gradle-stable.properties index 0afb61e6eb9593..24236432dea833 100644 --- a/components/ide/jetbrains/gateway-plugin/gradle-stable.properties +++ b/components/ide/jetbrains/gateway-plugin/gradle-stable.properties @@ -2,10 +2,10 @@ # See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html # for insight into build numbers and IntelliJ Platform versions. # revert pluginSinceBuild if it's unnecessary -pluginSinceBuild=242.20224 +pluginSinceBuild=242.21829 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 +platformVersion=242.21829.203 From a35d0b38f89a4061c0dddd5a2b189217dac21bd3 Mon Sep 17 00:00:00 2001 From: mustard Date: Thu, 12 Sep 2024 01:47:14 +0800 Subject: [PATCH 2/3] Fix and update GHA script --- .../ide/gha-update-image/index-jb-platform-update.ts | 2 ++ .../gha-update-image/lib/jb-update-platform-version.ts | 7 +++++-- components/ide/jetbrains/gateway-plugin/build.gradle.kts | 8 ++++---- .../ide/jetbrains/gateway-plugin/gradle-stable.properties | 4 ++-- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/components/ide/gha-update-image/index-jb-platform-update.ts b/components/ide/gha-update-image/index-jb-platform-update.ts index eeb688cc496b07..3b0a5fa0104faa 100644 --- a/components/ide/gha-update-image/index-jb-platform-update.ts +++ b/components/ide/gha-update-image/index-jb-platform-update.ts @@ -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", @@ -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", diff --git a/components/ide/gha-update-image/lib/jb-update-platform-version.ts b/components/ide/gha-update-image/lib/jb-update-platform-version.ts index bf0c5a81725a58..26f0e6707cacfe 100644 --- a/components/ide/gha-update-image/lib/jb-update-platform-version.ts +++ b/components/ide/gha-update-image/lib/jb-update-platform-version.ts @@ -12,6 +12,7 @@ interface TargetInfo { xmlName: string; xmlChannels: string[]; useXml: boolean; + useHumanreadableVersion: boolean; gradlePropertiesPath: string; gradlePropertiesTemplate: string; } @@ -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); @@ -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, }; } diff --git a/components/ide/jetbrains/gateway-plugin/build.gradle.kts b/components/ide/jetbrains/gateway-plugin/build.gradle.kts index 87054a8ed0f522..a6498d056107b8 100644 --- a/components/ide/jetbrains/gateway-plugin/build.gradle.kts +++ b/components/ide/jetbrains/gateway-plugin/build.gradle.kts @@ -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 @@ -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() }) } } @@ -106,7 +106,7 @@ intellijPlatform { } } - verifyPlugin { + pluginVerification { ides { properties("pluginVerifierIdeVersions").split(',').map(String::trim).forEach { version -> ide(IntelliJPlatformType.Gateway, version) diff --git a/components/ide/jetbrains/gateway-plugin/gradle-stable.properties b/components/ide/jetbrains/gateway-plugin/gradle-stable.properties index 24236432dea833..b70e1bd69a5d0c 100644 --- a/components/ide/jetbrains/gateway-plugin/gradle-stable.properties +++ b/components/ide/jetbrains/gateway-plugin/gradle-stable.properties @@ -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.21829.203 +# 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 From fe99f630b66c25ee029d5378a8447887c3b6e0a9 Mon Sep 17 00:00:00 2001 From: mustard Date: Thu, 12 Sep 2024 01:52:59 +0800 Subject: [PATCH 3/3] fixup --- .../ide/jetbrains/gateway-plugin/gradle-stable.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/ide/jetbrains/gateway-plugin/gradle-stable.properties b/components/ide/jetbrains/gateway-plugin/gradle-stable.properties index b70e1bd69a5d0c..73916f13b4757b 100644 --- a/components/ide/jetbrains/gateway-plugin/gradle-stable.properties +++ b/components/ide/jetbrains/gateway-plugin/gradle-stable.properties @@ -2,7 +2,7 @@ # See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html # for insight into build numbers and IntelliJ Platform versions. # revert pluginSinceBuild if it's unnecessary -pluginSinceBuild=242.21829 +pluginSinceBuild=242.20224 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.