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