diff --git a/ci-release-helper/build.gradle.kts b/ci-release-helper/build.gradle.kts index 76d603b02..506c0869a 100644 --- a/ci-release-helper/build.gradle.kts +++ b/ci-release-helper/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright 2019-2022 Mamoe Technologies and contributors. + * Copyright 2019-2023 Mamoe Technologies and contributors. * * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. @@ -104,19 +104,19 @@ tasks.register("updateSnapshotVersion") { result.assertNormalExitValue() val resultString = out.toByteArray().decodeToString() - val index = resultString + val branchAndIndex = resultString .substringAfter("", "") .substringBefore("", "") logger.info("Exec result:") logger.info(resultString) - if (index.isEmpty()) { + if (branchAndIndex.isEmpty()) { throw GradleException("Failed to find version.") } - logger.info("Snapshot version index is '$index'") - val versionName = "${Versions.project}-$branch-${index}" + logger.info("Snapshot version index is '$branchAndIndex'") + val versionName = "${Versions.project}-${branchAndIndex}" // Add annotation on GitHub Actions build // https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-a-notice-message diff --git a/ci-release-helper/src/buildIndex/SnapshotVersions.kt b/ci-release-helper/src/buildIndex/SnapshotVersions.kt index fc4614869..12fa1410e 100644 --- a/ci-release-helper/src/buildIndex/SnapshotVersions.kt +++ b/ci-release-helper/src/buildIndex/SnapshotVersions.kt @@ -41,7 +41,7 @@ object GetNextSnapshotIndex { } println() - println("${index.value}") + println("$branch-${index.value}") } } }