File tree Expand file tree Collapse file tree 3 files changed +16
-44
lines changed Expand file tree Collapse file tree 3 files changed +16
-44
lines changed Original file line number Diff line number Diff line change
1
+ PWD := $(shell pwd)
2
+ GOPATH := $(shell go env GOPATH)
3
+
1
4
default : mcs
2
5
3
6
.PHONY : mcs
4
7
mcs :
5
8
@echo " Building mcs binary to './mcs'"
6
- @ (CGO_ENABLED=0 go build --tags=kqueue --ldflags " -s -w" -o mcs ./cmd/mcs)
9
+ @ (CGO_ENABLED=0 go build -trimpath --tags=kqueue --ldflags " -s -w" -o mcs ./cmd/mcs)
10
+
11
+ install : mcs
12
+ @echo " Installing mcs binary to '$( GOPATH) /bin/mcs'"
13
+ @mkdir -p $(GOPATH ) /bin && cp -f $(PWD ) /mcs $(GOPATH ) /bin/mcs
14
+ @echo " Installation successful. To learn more, try \" mcs --help\" ."
7
15
8
16
swagger-gen :
9
17
@echo " Generating swagger server code from yaml"
10
18
@swagger generate server -A mcs --main-package=mcs --exclude-main -P models.Principal -f ./swagger.yml -r NOTICE
11
19
12
- build :
20
+ assets :
13
21
@ (cd portal-ui; yarn install; make build-static; cd ..)
14
- @ (CGO_ENABLED=0 go build --tags kqueue --ldflags " -s -w" -o mcs ./cmd/mcs)
15
22
16
23
test :
17
- @ (go test ./restapi -v)
24
+ @ (go test -race -v github.com/minio/mcs/restapi/... )
18
25
19
26
coverage :
20
- @ (go test ./restapi -v -coverprofile=coverage.out && go tool cover -html=coverage.out && open coverage.html)
27
+ @ (go test -v -coverprofile=coverage.out github.com/minio/mcs/restapi/... && go tool cover -html=coverage.out && open coverage.html)
21
28
22
29
clean :
30
+ @echo " Cleaning up all the generated files"
31
+ @find . -name ' *.test' | xargs rm -fv
32
+ @find . -name ' *~' | xargs rm -fv
23
33
@rm -vf mcs
Original file line number Diff line number Diff line change @@ -53,7 +53,6 @@ VERSION:
53
53
54
54
var appCmds = []cli.Command {
55
55
serverCmd ,
56
- versionCmd ,
57
56
}
58
57
59
58
func newApp (name string ) * cli.App {
@@ -106,7 +105,7 @@ func newApp(name string) *cli.App {
106
105
app .Name = name
107
106
app .Version = pkg .Version
108
107
app .Author = "MinIO, Inc."
109
- app .Usage = "mcs COMMAND "
108
+ app .Usage = "mcs"
110
109
app .Description = `MinIO Console Server`
111
110
app .Commands = commands
112
111
app .HideHelpCommand = true // Hide `help, h` command, we already have `minio --help`.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments