feat: 新增安装脚本
This commit is contained in:
parent
229bbe76e8
commit
0fd915a2ee
@ -32,7 +32,8 @@ func main() {
|
||||
|
||||
for _, svc := range serviceDirs {
|
||||
out := filepath.Join(binDir, svc)
|
||||
pkg := filepath.ToSlash(filepath.Join("./cmd", svc))
|
||||
// 必须使用相对前缀 ./,否则 go 会将其当成标准库/模块路径
|
||||
pkg := "./" + filepath.ToSlash(filepath.Join("cmd", svc))
|
||||
fmt.Printf("编译 %s -> %s\n", pkg, out)
|
||||
if err := run("go", "build", "-o", out, pkg); err != nil {
|
||||
fatalf("编译失败 %s: %v", pkg, err)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user