From 9c233ab23e09683f6320733f79393f5f040f4e7c Mon Sep 17 00:00:00 2001 From: up9-github Date: Tue, 27 Apr 2021 18:05:42 +0300 Subject: [PATCH 1/3] Update Makefile --- cli/Makefile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 cli/Makefile diff --git a/cli/Makefile b/cli/Makefile new file mode 100644 index 000000000..5f6b61d62 --- /dev/null +++ b/cli/Makefile @@ -0,0 +1,18 @@ +build: + go build -o bin/main main.go + +build-cr: + echo "Compiling for every OS and Platform" + GOOS=linux GOARCH=386 go build -o bin/mizu-linux-386 main.go + GOOS=windows GOARCH=386 go build -o bin/mizu-windows-386.exe main.go + + GOOS=darwin GOARCH=amd64 go build -o bin/mizu-darwin-amd64 main.go + GOOS=linux GOARCH=amd64 go build -o bin/mizu-linux-amd64 main.go + GOOS=windows GOARCH=amd64 go build -o bin/mizu-windows-amd64.exe main.go + + GOOS=darwin GOARCH=arm64 go build -o bin/mizu-darwin-arm64 main.go + GOOS=linux GOARCH=arm64 go build -o bin/mizu-linux-arm64 main.go + GOOS=windows GOARCH=arm64 go build -o bin/mizu-windows-arm64 main.go + +run: + go run main.go ".*" From d800a473c94dc5a9251073e5011728bb60dfa970 Mon Sep 17 00:00:00 2001 From: up9-github Date: Tue, 27 Apr 2021 18:12:15 +0300 Subject: [PATCH 2/3] Update Makefile --- cli/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cli/Makefile b/cli/Makefile index 5f6b61d62..322898282 100644 --- a/cli/Makefile +++ b/cli/Makefile @@ -1,3 +1,7 @@ +install: + go build -o bin/main main.go + cp bin/main /usr/local/bin/mizu + build: go build -o bin/main main.go From 206564db9b33a6748fbf104e1a4a254a2a15c1ec Mon Sep 17 00:00:00 2001 From: up9-github Date: Tue, 27 Apr 2021 20:01:06 +0300 Subject: [PATCH 3/3] Update Makefile, README.md, and 4 more files... --- cli/Makefile | 23 +++++++++++------------ cli/README.md | 8 ++++---- cli/{main.go => mizu.go} | 0 cli/mizu/{mizu.go => mizuRunner.go} | 0 4 files changed, 15 insertions(+), 16 deletions(-) rename cli/{main.go => mizu.go} (100%) rename cli/mizu/{mizu.go => mizuRunner.go} (100%) diff --git a/cli/Makefile b/cli/Makefile index 322898282..05a8c362b 100644 --- a/cli/Makefile +++ b/cli/Makefile @@ -1,22 +1,21 @@ install: - go build -o bin/main main.go - cp bin/main /usr/local/bin/mizu + go build install mizu.go build: - go build -o bin/main main.go + 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 main.go - GOOS=windows GOARCH=386 go build -o bin/mizu-windows-386.exe main.go + 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 main.go - GOOS=linux GOARCH=amd64 go build -o bin/mizu-linux-amd64 main.go - GOOS=windows GOARCH=amd64 go build -o bin/mizu-windows-amd64.exe main.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 main.go - GOOS=linux GOARCH=arm64 go build -o bin/mizu-linux-arm64 main.go - GOOS=windows GOARCH=arm64 go build -o bin/mizu-windows-arm64 main.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 main.go ".*" + 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