Skip to content

Commit 5443538

Browse files
committed
Add shared GitHub release updater and bump 1.4.0
1 parent d49dc9e commit 5443538

10 files changed

Lines changed: 799 additions & 9 deletions

File tree

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,24 @@ All notable changes to MatrixLib will be documented in this file.
44

55
The format is based on Keep a Changelog, and this project follows Semantic Versioning for release tags.
66

7+
## [1.4.0] - 2026-04-05
8+
9+
### Added
10+
11+
- Added shared GitHub Releases updater with admin approval workflow.
12+
- Added centralized registration for MatrixAuth, MatrixCook, MatrixShop, and MatrixStorage.
13+
- Added `/matrixlib update ...` commands and updater config resource.
14+
15+
### Changed
16+
17+
- MatrixLib now manages Matrix-series update checks and downloads to `plugins/update/`.
18+
- Updated docs and README to explain the approval-based update flow.
19+
20+
### Validated
21+
22+
- Verified `bash ./gradlew build`.
23+
- Verified downstream builds for MatrixAuth, MatrixCook, MatrixShop, and MatrixStorage against `matrixlibApiVersion=1.4.0`.
24+
725
## [1.3.0] - 2026-04-05
826

927
### Added

README.md

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77

88
| 文档 | Release Notes | Releases | Issues |
99
| --- | --- | --- | --- |
10-
| [Docs](https://54895y.github.io/docs/matrixlib) | [1.3.0](https://54895y.github.io/docs/matrixlib/release-notes-1-3-0) | [GitHub Releases](https://github.com/54895y/MatrixLib/releases) | [GitHub Issues](https://github.com/54895y/MatrixLib/issues) |
10+
| [Docs](https://54895y.github.io/docs/matrixlib) | [1.4.0](https://54895y.github.io/docs/matrixlib/release-notes-1-4-0) | [GitHub Releases](https://github.com/54895y/MatrixLib/releases) | [GitHub Issues](https://github.com/54895y/MatrixLib/issues) |
1111

1212
## 当前发布
1313

14-
- 当前版本:`1.3.0`
15-
- 依赖坐标:`com.y54895.matrixlib:matrixlib-api:1.3.0`
14+
- 当前版本:`1.4.0`
15+
- 依赖坐标:`com.y54895.matrixlib:matrixlib-api:1.4.0`
1616
- 服务对象:`MatrixShop / MatrixAuth / MatrixCook / MatrixStorage`
1717
- 支持核心:`Paper / Bukkit / Spigot / Folia`
1818

@@ -25,19 +25,48 @@
2525
- 共享 Bukkit / Folia 兼容桥接
2626
- 共享 `bStats` 封装 API `MatrixBStats`
2727
- 为下游插件统一承接 `bStats` shaded 依赖与图表注册
28+
- 共享 GitHub Releases 更新检查、审批下载与 `plugins/update/` 投递
2829

2930
## 下游集成
3031

3132
下游项目当前统一引用:
3233

3334
```kotlin
3435
dependencies {
35-
compileOnly("com.y54895.matrixlib:matrixlib-api:1.3.0")
36+
compileOnly("com.y54895.matrixlib:matrixlib-api:1.4.0")
3637
}
3738
```
3839

3940
如果工作区里存在本地 `MatrixLib` 目录,下游项目会通过 `includeBuild` 直接链接源码;否则会通过 GitHub `sourceControl` 拉取。
4041

42+
## 自动更新
43+
44+
当前推荐方案:
45+
46+
- 用 GitHub Releases latest API 检查新版本
47+
- 默认只提示,不直接覆盖当前运行中的 jar
48+
- 由管理员审批后下载到 `plugins/update/`
49+
- 服务器重启后由 Bukkit / Spigot 更新目录机制自动替换
50+
51+
配置文件:
52+
53+
```text
54+
plugins/MatrixLib/Update/config.yml
55+
```
56+
57+
管理命令:
58+
59+
```text
60+
/matrixlib update list
61+
/matrixlib update check [all|插件名]
62+
/matrixlib update notes <插件名>
63+
/matrixlib update approve <插件名|all>
64+
```
65+
66+
默认启用审批模式:
67+
68+
- `require-approval: true`
69+
4170
## bStats 遥测
4271

4372
- Plugin ID: `30557`

RELEASE_POST_BBCODE.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[center][size=6][b]MatrixLib[/b][/size][/center]
22
[center][size=4]Matrix 系列统一前置插件 / 共享运行时基础层[/size][/center]
3-
[center][size=3]当前发布版本:1.3.0[/size][/center]
3+
[center][size=3]当前发布版本:1.4.0[/size][/center]
44

55
[hr]
66

@@ -61,9 +61,10 @@ MatrixLib 是 Matrix 系列插件的共享前置插件,用于统一品牌风
6161
当前源码主线版本重点如下:
6262

6363
[list]
64-
[*]当前发布版本已升级到 1.3.0
64+
[*]当前发布版本已升级到 1.4.0
6565
[*]共享 economy API 已正式收敛到 MatrixLib
6666
[*]新增共享 MatrixBStats API,统一承接 Matrix 系列插件的 bStats 遥测注册
67+
[*]新增共享 GitHub Releases 更新器,支持管理员审批下载到 plugins/update
6768
[*]plugins/MatrixLib/Economy/currency.yml 成为 Matrix 系列货币定义主入口
6869
[*]运行时会同步货币文件到 MatrixShop 与 MatrixStorage
6970
[*]共享 runtime text / console 能力已经稳定承载下游插件

RELEASE_POST_MINEBBS_BBCODE.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[center][size=7][b]MatrixLib[/b][/size][/center]
22
[center][size=4][color=#3D8BFF]Matrix 系列统一前置插件 / 共享运行时基础层[/color][/size][/center]
33
[center][color=#999999]适用于 MatrixShop / MatrixStorage / MatrixAuth / MatrixCook[/color][/center]
4-
[center][color=#999999]当前发布版本:1.3.0[/color][/center]
4+
[center][color=#999999]当前发布版本:1.4.0[/color][/center]
55

66
[hr]
77

@@ -88,9 +88,10 @@ MatrixLib 是 Matrix 系列插件的共享前置插件,用于统一品牌风
8888
[b]当前源码主线重点:[/b]
8989

9090
[list]
91-
[*]当前发布版本已升级到 1.3.0
91+
[*]当前发布版本已升级到 1.4.0
9292
[*]共享 economy API 已正式收敛到 MatrixLib
9393
[*]新增共享 MatrixBStats API,统一承接 Matrix 系列插件的 bStats 遥测注册
94+
[*]新增共享 GitHub Releases 更新器,支持管理员审批下载到 plugins/update
9495
[*]plugins/MatrixLib/Economy/currency.yml 成为 Matrix 系列货币定义主入口
9596
[*]运行时会同步货币文件到 MatrixShop 与 MatrixStorage
9697
[*]共享 runtime text / console 能力已经稳定承载下游插件

build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ taboolib {
2626
coroutines = "1.8.1"
2727
}
2828
relocate("org.bstats", "${project.group}.libs.bstats")
29+
relocate("com.google.gson", "${project.group}.libs.gson")
2930
}
3031

3132
repositories {
@@ -35,6 +36,7 @@ repositories {
3536

3637
dependencies {
3738
taboo("org.bstats:bstats-bukkit:3.2.1")
39+
taboo("com.google.code.gson:gson:2.11.0")
3840
compileOnly("org.spigotmc:spigot-api:1.12.2-R0.1-SNAPSHOT")
3941
compileOnly(kotlin("stdlib"))
4042
compileOnly(fileTree("libs") {

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
group=com.y54895.matrixlib
2-
version=1.3.0
2+
version=1.4.0
33
kotlin.incremental=true
44
kotlin.incremental.java=true
55
kotlin.caching.enabled=true

src/main/kotlin/com/y54895/matrixlib/MatrixLib.kt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,13 @@ import com.y54895.matrixlib.api.brand.MatrixBranding
44
import com.y54895.matrixlib.api.console.MatrixConsoleFact
55
import com.y54895.matrixlib.api.console.MatrixConsoleVisuals
66
import com.y54895.matrixlib.api.economy.MatrixEconomy
7+
import com.y54895.matrixlib.api.update.MatrixPluginUpdates
8+
import com.y54895.matrixlib.command.MatrixLibCommands
79
import com.y54895.matrixlib.metrics.BStatsMetrics
810
import taboolib.common.platform.Plugin
911
import taboolib.common.platform.function.pluginVersion
1012
import taboolib.common.platform.function.warning
13+
import taboolib.platform.BukkitPlugin
1114

1215
object MatrixLib : Plugin() {
1316

@@ -30,6 +33,16 @@ object MatrixLib : Plugin() {
3033

3134
override fun onEnable() {
3235
MatrixEconomy.reload()
36+
MatrixPluginUpdates.bootstrap(branding)
37+
MatrixLibCommands.register()
38+
MatrixPluginUpdates.register(
39+
plugin = BukkitPlugin.getInstance(),
40+
displayName = "MatrixLib",
41+
repoOwner = "54895y",
42+
repoName = "MatrixLib",
43+
assetNamePattern = "MatrixLib-.*\\.jar",
44+
commandHint = "/matrixlib"
45+
)
3346
runCatching { BStatsMetrics.initialize() }
3447
.onFailure {
3548
warning("Failed to initialize bStats metrics: ${it.message ?: it.javaClass.simpleName}")
@@ -40,6 +53,7 @@ object MatrixLib : Plugin() {
4053
details = listOf(
4154
MatrixConsoleFact("共享接口", "action / menu / compat / text / yaml / console / economy"),
4255
MatrixConsoleFact("货币提供者", MatrixEconomy.providerSummary()),
56+
MatrixConsoleFact("更新器", "GitHub Releases / 审批下载 / plugins/update"),
4357
MatrixConsoleFact("运行状态", "控制台品牌 / 资源桥接 / 通用适配")
4458
)
4559
)

0 commit comments

Comments
 (0)