From 6df8a5c62848389b37758b0d868d992636b73626 Mon Sep 17 00:00:00 2001 From: Nikita Iarychenko Date: Wed, 29 Oct 2025 11:40:56 +0400 Subject: [PATCH] OPENIDE fix build number (cherry picked from commit 6616969f9049ddef6c0c049fe2cde92853bd14e6) (cherry picked from commit 93f8364c256b7d24a86c08a6a8dc87a7e629d946) --- .../intellij/build/impl/BuildContextImpl.kt | 9 ++++++--- .../intellij/build/impl/PluginXmlPatcher.kt | 17 ++++++++++------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/platform/build-scripts/src/org/jetbrains/intellij/build/impl/BuildContextImpl.kt b/platform/build-scripts/src/org/jetbrains/intellij/build/impl/BuildContextImpl.kt index 986b4c329b63..804afe67f386 100644 --- a/platform/build-scripts/src/org/jetbrains/intellij/build/impl/BuildContextImpl.kt +++ b/platform/build-scripts/src/org/jetbrains/intellij/build/impl/BuildContextImpl.kt @@ -1,4 +1,7 @@ // Copyright 2000-2026 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// +// Modified by Nikita Iarychenko at 2025 as part of the OpenIDE project(https://openide.ru). +// Any modifications are available on the same license terms as the original source code. @file:Suppress("ReplaceGetOrSet") package org.jetbrains.intellij.build.impl @@ -177,9 +180,9 @@ class BuildContextImpl internal constructor( if (isNightly(value)) { value = "$value.0" } - check(SemVer.parseFromText(value) != null) { - "The plugin build number $value is expected to match the Semantic Versioning, see https://semver.org" - } + //check(SemVer.parseFromText(value) != null) { + // "The plugin build number $value is expected to match the Semantic Versioning, see https://semver.org" + //} value } diff --git a/platform/build-scripts/src/org/jetbrains/intellij/build/impl/PluginXmlPatcher.kt b/platform/build-scripts/src/org/jetbrains/intellij/build/impl/PluginXmlPatcher.kt index ba5271e0cf6b..cce3c2492069 100644 --- a/platform/build-scripts/src/org/jetbrains/intellij/build/impl/PluginXmlPatcher.kt +++ b/platform/build-scripts/src/org/jetbrains/intellij/build/impl/PluginXmlPatcher.kt @@ -1,4 +1,7 @@ // Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// +// Modified by Nikita Iarychenko at 2025 as part of the OpenIDE project(https://openide.ru). +// Any modifications are available on the same license terms as the original source code. package org.jetbrains.intellij.build.impl import com.intellij.openapi.util.JDOMUtil @@ -125,13 +128,13 @@ private val DEV_BUILD_SCHEME: Regex = Regex("^${SnapshotBuildNumber.BASE.replace private suspend fun getPluginVersion(plugin: PluginLayout, descriptorContent: String, context: BuildContext): PluginVersionEvaluatorResult { val pluginVersion = plugin.versionEvaluator.evaluate(pluginXmlSupplier = { descriptorContent }, ideBuildVersion = context.pluginBuildNumber, context = context) - check( - !plugin.semanticVersioning || - SemVer.parseFromText(pluginVersion.pluginVersion) != null || - DEV_BUILD_SCHEME.matches(pluginVersion.pluginVersion) - ) { - "$plugin version '${pluginVersion.pluginVersion}' is expected to match either '$DEV_BUILD_SCHEME' or the Semantic Versioning, see https://semver.org" - } + //check( + // !plugin.semanticVersioning || + // SemVer.parseFromText(pluginVersion.pluginVersion) != null || + // DEV_BUILD_SCHEME.matches(pluginVersion.pluginVersion) + //) { + // "$plugin version '${pluginVersion.pluginVersion}' is expected to match either '$DEV_BUILD_SCHEME' or the Semantic Versioning, see https://semver.org" + //} return pluginVersion }