feat(plugin): parse explicit plugin SDK compatibility
This commit is contained in:
parent
f6e09fde4b
commit
3c8a99ea26
@ -57,6 +57,7 @@ type ModPlugin struct {
|
|||||||
|
|
||||||
type ModCompat struct {
|
type ModCompat struct {
|
||||||
BlockCore string `toml:"block_core"`
|
BlockCore string `toml:"block_core"`
|
||||||
|
PluginSDK string `toml:"plugin_sdk"`
|
||||||
AdminAPI string `toml:"admin_api"`
|
AdminAPI string `toml:"admin_api"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -278,6 +278,7 @@ version = "0.2.0"
|
|||||||
|
|
||||||
[compatibility]
|
[compatibility]
|
||||||
block_core = ">=1.5 <2.0"
|
block_core = ">=1.5 <2.0"
|
||||||
|
plugin_sdk = ">=0.3.7 <0.4.0"
|
||||||
admin_api = ">=0.1.2 <0.2.0"
|
admin_api = ">=0.1.2 <0.2.0"
|
||||||
|
|
||||||
[[requires]]
|
[[requires]]
|
||||||
@ -298,6 +299,9 @@ version = ">=1.2"
|
|||||||
if m.Compatibility.BlockCore != ">=1.5 <2.0" {
|
if m.Compatibility.BlockCore != ">=1.5 <2.0" {
|
||||||
t.Errorf("Compat.BlockCore = %q", m.Compatibility.BlockCore)
|
t.Errorf("Compat.BlockCore = %q", m.Compatibility.BlockCore)
|
||||||
}
|
}
|
||||||
|
if m.Compatibility.PluginSDK != ">=0.3.7 <0.4.0" {
|
||||||
|
t.Errorf("Compat.PluginSDK = %q", m.Compatibility.PluginSDK)
|
||||||
|
}
|
||||||
if m.Compatibility.AdminAPI != ">=0.1.2 <0.2.0" {
|
if m.Compatibility.AdminAPI != ">=0.1.2 <0.2.0" {
|
||||||
t.Errorf("Compat.AdminAPI = %q", m.Compatibility.AdminAPI)
|
t.Errorf("Compat.AdminAPI = %q", m.Compatibility.AdminAPI)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user