forked from openimsdk/gomake
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmagefile.go
More file actions
49 lines (38 loc) · 694 Bytes
/
Copy pathmagefile.go
File metadata and controls
49 lines (38 loc) · 694 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//go:build mage
// +build mage
package main
import (
"flag"
"os"
"github.com/openimsdk/gomake/mageutil"
)
var Default = Build
// Build support specifical binary build.
//
// Example: `mage build openim-api openim-rpc-user seq`
func Build() {
flag.Parse()
bin := flag.Args()
if len(bin) != 0 {
bin = bin[1:]
}
mageutil.Build(bin)
}
func Start() {
mageutil.InitForSSC()
err := setMaxOpenFiles()
if err != nil {
mageutil.PrintRed("setMaxOpenFiles failed " + err.Error())
os.Exit(1)
}
mageutil.StartToolsAndServices()
}
func Stop() {
mageutil.StopAndCheckBinaries()
}
func Check() {
mageutil.CheckAndReportBinariesStatus()
}
func Protocol() {
mageutil.Protocol()
}