1
0
mirror of https://shylinux.com/x/icebergs synced 2025-04-25 17:18:05 +08:00
This commit is contained in:
IT 老营长 @云轩领航-创始人 2025-03-01 11:36:50 +08:00
parent 8fa2f6e8b3
commit 7fea8e88a4

View File

@ -1,7 +1,6 @@
package code package code
import ( import (
"os"
"path" "path"
"runtime" "runtime"
"strings" "strings"
@ -119,10 +118,9 @@ func init() {
m.Options(cli.CMD_ENV, env).Cmd(AUTOGEN, VERSION) m.Options(cli.CMD_ENV, env).Cmd(AUTOGEN, VERSION)
_compile_get(m, main) _compile_get(m, main)
defer m.StatusTime(VERSION, strings.TrimPrefix(GoVersion(m), "go version")) defer m.StatusTime(VERSION, strings.TrimPrefix(GoVersion(m), "go version"))
args := []string{main, ice.SRC_VERSION_GO, ice.SRC_BINPACK_GO, ice.SRC_BINPACK_USR_GO} args := []string{main, ice.SRC_VERSION_GO}
if _, e := os.Stat("src/option.go"); e == nil { nfs.Exists(m, "src/option.go", func(p string) { args = append(args, p) })
args = append(args, "src/option.go") kit.If(file != ice.BIN_ICE_BIN, func() { args = append(args, ice.SRC_BINPACK_GO, ice.SRC_BINPACK_USR_GO) })
}
if msg := GoBuild(m.Spawn(), file, args...); !cli.IsSuccess(msg) { if msg := GoBuild(m.Spawn(), file, args...); !cli.IsSuccess(msg) {
m.Copy(msg) m.Copy(msg)
} else { } else {