fix(ci): preserve installer compatibility with older releases

This commit is contained in:
Lemon-miaow committed 2026-10-05 00:23:35 +08:00
1 parent 30c37617c7
commit 862ff3929f
5 files changed
+49 -23

No files matched your search

+9 -2
View File
@@ -9,10 +9,17 @@ import (
func cmdBootstrapAssets(args []string, stdout, stderr io.Writer) int {
if len(args) != 1 {
fmt.Fprintln(stderr, "felis bootstrap-assets: usage: felis bootstrap-assets crd|game-stack")
fmt.Fprintln(stderr, "felis bootstrap-assets: usage: felis bootstrap-assets crd|game-stack|config-keys")
return 2
}
switch args[0] {
case "config-keys":
// Optional keys the installer may emit; older binaries reject this verb.
_, err := fmt.Fprintln(stdout, "velocity.game_version")
if err != nil {
fmt.Fprintf(stderr, "felis bootstrap-assets: write: %v\n", err)
return 1
}
case "crd":
crd, err := felis.MinecraftServerCRD()
if err != nil {
@@ -32,7 +39,7 @@ func cmdBootstrapAssets(args []string, stdout, stderr io.Writer) int {
return 1
}
default:
fmt.Fprintln(stderr, "felis bootstrap-assets: usage: felis bootstrap-assets crd|game-stack")
fmt.Fprintln(stderr, "felis bootstrap-assets: usage: felis bootstrap-assets crd|game-stack|config-keys")
return 2
}
return 0