Skip to content

Commit

Permalink
release: v3.0.0-M1
Browse files Browse the repository at this point in the history
  • Loading branch information
ForteScarlet committed Oct 24, 2022
1 parent 7b9479f commit 7ecbdff
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 104 deletions.
18 changes: 18 additions & 0 deletions .changelog/v3.0.0-M1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<details>
<summary><b>仓库参考</b></summary>

| **模块** | **search.maven** |
|---------|------------------|
| simbot-logger | [v3.0.0-M1](https://search.maven.org/artifact/love.forte.simbot/simbot-logger/3.0.0-M1/jar) |
| simbot-logger-jvm | [v3.0.0-M1](https://search.maven.org/artifact/love.forte.simbot/simbot-logger-jvm/3.0.0-M1/jar) |
| simbot-logger-js | [v3.0.0-M1](https://search.maven.org/artifact/love.forte.simbot/simbot-logger-js/3.0.0-M1/jar) |
| simbot-api | [v3.0.0-M1](https://search.maven.org/artifact/love.forte.simbot/simbot-api/3.0.0-M1/jar) |
| simbot-core | [v3.0.0-M1](https://search.maven.org/artifact/love.forte.simbot/simbot-core/3.0.0-M1/jar) |
| simboot-api | [v3.0.0-M1](https://search.maven.org/artifact/love.forte.simbot.boot/simboot-api/3.0.0-M1/jar) |
| simboot-core | [v3.0.0-M1](https://search.maven.org/artifact/love.forte.simbot.boot/simboot-core/3.0.0-M1/jar) |
| simboot-core-annotation | [v3.0.0-M1](https://search.maven.org/artifact/love.forte.simbot.boot/simboot-core-annotation/3.0.0-M1/jar) |
| simboot-core-spring-boot-starter | [v3.0.0-M1](https://search.maven.org/artifact/love.forte.simbot.boot/simboot-core-spring-boot-starter/3.0.0-M1/jar) |

</details>

期间暂无相关反馈,发布 `v3.0.0` 第一个预发布里程碑版本。将会开始逐步完善文档内容。
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/P.kt
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ sealed class P(override val group: String) : ProjectDetail() {
init {
val mainVersion = version(3, 0, 0)
//
var status = version("beta", 4)
var status = version("M1")
versionWithoutSnapshot = mainVersion - status.copy()
if (isSnapshot()) {
status = status - Version.SNAPSHOT
Expand Down
122 changes: 19 additions & 103 deletions buildSrc/src/main/kotlin/simbot.changelog-generator.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,12 @@ tasks.create("createChangelog") {
file.createNewFile()

val autoGenerateText = buildString {
appendLine("**仓库参考:**").appendLine()

appendLine("<details>")
appendLine("<summary><b>仓库参考</b></summary>")
appendLine()

appendLine("| **模块** | **repo1.maven** | **search.maven** |")
appendLine("|---------|-----------------|------------------|")
appendLine("| **模块** | **search.maven** |")
appendLine("|---------|------------------|")
repoRowMulti(simbotLoggerKotlin, "simbot-logger", "love.forte.simbot", "simbot-logger", realVersion)
repoRow("simbot-api", "love.forte.simbot", "simbot-api", realVersion)
repoRow("simbot-core", "love.forte.simbot", "simbot-core", realVersion)
Expand All @@ -76,116 +74,28 @@ tasks.create("createChangelog") {
appendLine("</details>")
}

// val autoGenerateText0 = """
// **仓库参考:**
//
// | **模块** | **repo1.maven** | **search.maven** |
// |---------|-----------------|------------------|
// ${repoRow("simbot-api", "love.forte.simbot", "simbot-api", realVersion)}
// ${repoRow("simbot-core", "love.forte.simbot", "simbot-core", realVersion)}
// ${repoRow("simbot-logger-jvm", "love.forte.simbot", "simbot-logger-jvm", realVersion)}
// ${repoRow("simbot-logger-js", "love.forte.simbot", "simbot-logger-js", realVersion)}
// ${repoRow("simbot-logger-macosx64", "love.forte.simbot", "simbot-logger-macosx64", realVersion)}
// ${repoRow("simbot-logger-linuxx64", "love.forte.simbot", "simbot-logger-linuxx64", realVersion)}
// ${repoRow("simbot-logger-mingwx64", "love.forte.simbot", "simbot-logger-mingwx64", realVersion)}
// ${repoRow("simboot-api", "love.forte.simbot.boot", "simboot-api", realVersion)}
// ${repoRow("simboot-core", "love.forte.simbot.boot", "simboot-core", realVersion)}
// ${repoRow("simboot-core-annotation", "love.forte.simbot.boot", "simboot-core-annotation", realVersion)}
// ${
// repoRow(
// "simboot-core-spring-boot-starter",
// "love.forte.simbot.boot",
// "simboot-core-spring-boot-starter",
// realVersion
// )
// }
//
//
//
//
// """.trimIndent()


file.writeText(autoGenerateText)
}

/*
**仓库参考:**
* [simbot-api: $version](https://repo1.maven.org/maven2/love/forte/simbot/simbot-api/$realVersion)
* [simbot-core: $version](https://repo1.maven.org/maven2/love/forte/simbot/simbot-core/$realVersion)
* [simbot-logger: $version](https://repo1.maven.org/maven2/love/forte/simbot/simbot-logger/$realVersion)
* [simboot-api: $version](https://repo1.maven.org/maven2/love/forte/simbot/boot/simboot-api/$realVersion)
* [simboot-core: $version](https://repo1.maven.org/maven2/love/forte/simbot/boot/simboot-core/$realVersion)
* [simboot-core-annotation: $version](https://repo1.maven.org/maven2/love/forte/simbot/boot/simboot-core-annotation/$realVersion)
* [simboot-core-spring-boot-starter: $version](https://repo1.maven.org/maven2/love/forte/simbot/boot/simboot-core-spring-boot-starter/$realVersion)
*/

// ## 组件更新
// 相关组件会在后续三日内跟进更新
// - [mirai组件](https://github.com/simple-robot/simbot-component-mirai/releases)
// - [腾讯频道组件](https://github.com/simple-robot/simbot-component-tencent-guild/releases)
// - [开黑啦组件](https://github.com/simple-robot/simbot-component-kaiheila/releases)

}
}

// fun repoRow(moduleName: String, group: String, id: String, version: String): String {
// return "| $moduleName | [$moduleName: v$version](https://repo1.maven.org/maven2/${
// group.replace(
// ".",
// "/"
// )
// }/${
// id.replace(
// ".",
// "/"
// )
// }/$version) | [$moduleName: v$version](https://search.maven.org/artifact/$group/$id/$version/jar) |"
// }
//
// fun repoRowMulti(
// kotlin: KotlinMultiplatformExtension,
// moduleName: String,
// group: String,
// id: String,
// version: String,
// ): String {
// kotlin.targets.forEach {
// println("simbot-logger target: $it")
// }
//
// return repoRow(moduleName, group, id, version)
// }


fun StringBuilder.repoRow(moduleName: String, group: String, id: String, version: String) {
append("| ").append(moduleName).append(" | [").append(moduleName).append(": v").append(version)
append("](https://repo1.maven.org/maven2/")
append(group.replace(".", "/"))
append('/')
append(id.replace(".", "/"))
append('/')
append(version)
append(") | [")
append(moduleName).append(": v").append(version)
append("| ").append(moduleName)
append(" | [")
append("v").append(version)
append("](https://search.maven.org/artifact/")
append(group).append("/").append(id).append("/").append(version).append("/jar) |")
appendLine()
// "| $moduleName | [$moduleName: v$version](https://repo1.maven.org/maven2/${
// group.replace(
// ".",
// "/"
// )
// }/${
// id.replace(
// ".",
// "/"
// )
// }/$version) | [$moduleName: v$version](https://search.maven.org/artifact/$group/$id/$version/jar) |"
}

private val multiPlatformType = setOf(
KotlinPlatformType.common,
KotlinPlatformType.jvm,
KotlinPlatformType.js,
)

fun StringBuilder.repoRowMulti(
kotlin: KotlinMultiplatformExtension,
moduleName: String,
Expand All @@ -194,11 +104,17 @@ fun StringBuilder.repoRowMulti(
version: String,
) {
kotlin.targets.filter {
it.platformType != KotlinPlatformType.common
it.platformType in multiPlatformType
}.sortedBy {
it.platformType
}.forEach {
repoRow("$moduleName-${it.targetName}", group, "$id-${it.targetName.toLowerCase()}", version)
when (it.platformType) {
KotlinPlatformType.common ->
repoRow("$moduleName", group, id, version)
else ->
repoRow("$moduleName-${it.targetName}", group, "$id-${it.targetName.toLowerCase()}", version)
}

}

}

0 comments on commit 7ecbdff

Please sign in to comment.