| @@ -10,6 +10,9 @@ import ( | |||||
| "gitlink.org.cn/cloudream/common/magefiles" | "gitlink.org.cn/cloudream/common/magefiles" | ||||
| //mage:import | |||||
| _ "gitlink.org.cn/cloudream/common/magefiles/targets" | |||||
| cp "github.com/otiai10/copy" | cp "github.com/otiai10/copy" | ||||
| ) | ) | ||||
| @@ -17,21 +20,6 @@ const ( | |||||
| BuildDir = "./build" | BuildDir = "./build" | ||||
| ) | ) | ||||
| // [配置项]设置编译平台为windows | |||||
| func Win() { | |||||
| magefiles.Global.OS = "win" | |||||
| } | |||||
| // [配置项]设置编译平台为linux | |||||
| func Linux() { | |||||
| magefiles.Global.OS = "linux" | |||||
| } | |||||
| // [配置项]设置编译架构为amd64 | |||||
| func AMD64() { | |||||
| magefiles.Global.Arch = "amd64" | |||||
| } | |||||
| func All() error { | func All() error { | ||||
| if err := Bin(); err != nil { | if err := Bin(); err != nil { | ||||
| return err | return err | ||||