diff --git a/cli/Makefile b/cli/Makefile new file mode 100644 index 000000000..05a8c362b --- /dev/null +++ b/cli/Makefile @@ -0,0 +1,21 @@ +install: + go build install mizu.go + +build: + go build -o bin/mizu mizu.go + +build-cr: + echo "Compiling for every OS and Platform" + GOOS=linux GOARCH=386 go build -o bin/mizu-linux-386 mizu.go + GOOS=windows GOARCH=386 go build -o bin/mizu-windows-386.exe mizu.go + + GOOS=darwin GOARCH=amd64 go build -o bin/mizu-darwin-amd64 mizu.go + GOOS=linux GOARCH=amd64 go build -o bin/mizu-linux-amd64 mizu.go + GOOS=windows GOARCH=amd64 go build -o bin/mizu-windows-amd64.exe mizu.go + + GOOS=darwin GOARCH=arm64 go build -o bin/mizu-darwin-arm64 mizu.go + GOOS=linux GOARCH=arm64 go build -o bin/mizu-linux-arm64 mizu.go + GOOS=windows GOARCH=arm64 go build -o bin/mizu-windows-arm64 mizu.go + +run: + go run . ".*" diff --git a/cli/README.md b/cli/README.md index 07a3c4ae5..01dd24ba7 100644 --- a/cli/README.md +++ b/cli/README.md @@ -1,6 +1,6 @@ # mizu CLI ## Usage -`./main {pod_name_regex}` +`./mizu {pod_name_regex}` ### Optional Flags @@ -11,15 +11,15 @@ | `--namespace` | | use namespace different than the one found in kubeconfig | | `--kubeconfig` | | Path to custom kubeconfig file | -There are some extra flags defined in code that will show up in `./main --help`, these are non functional stubs for now +There are some extra flags defined in code that will show up in `./mizu --help`, these are non functional stubs for now ## Installation Make sure your go version is at least 1.11 1. cd to `mizu/cli` 2. Run `go mod download` (may take a moment) -3. Run `go build main.go` +3. Run `go build mizu.go` -Alternatively, you can build+run directly using `go run main.go {pod_name_regex}` +Alternatively, you can build+run directly using `go run mizu.go {pod_name_regex}` ## Known issues diff --git a/cli/main.go b/cli/mizu.go similarity index 100% rename from cli/main.go rename to cli/mizu.go diff --git a/cli/mizu/mizu.go b/cli/mizu/mizuRunner.go similarity index 100% rename from cli/mizu/mizu.go rename to cli/mizu/mizuRunner.go