Add cli make file

Add cli make file
This commit is contained in:
RamiBerm
2021-04-28 11:22:32 +03:00
committed by GitHub
4 changed files with 25 additions and 4 deletions

21
cli/Makefile Normal file
View File

@@ -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 . ".*"

View File

@@ -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