Skip to content
This repository was archived by the owner on Feb 21, 2023. It is now read-only.

Commit

Permalink
cli name change (#72)
Browse files Browse the repository at this point in the history
* cli name change

* Update initlocal.go

Co-authored-by: Saiyam Pathak <[email protected]>
Co-authored-by: Alessandro Festa <[email protected]>
  • Loading branch information
3 people authored Dec 14, 2020
1 parent d5f8481 commit 9cf950b
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
builds:
- id: k3ai-cli
binary: k3ai-cli
- id: k3ai
binary: k3ai
main: ./
ldflags:
- -X github.com/kf5i/k3ai-core/cmd/tools/cli.version={{.Version}} -X github.com/kf5i/k3ai-core/cmd/tools/cli.commit={{.Commit}} -X github.com/kf5i/k3ai-core/cmd/tools/cli.goVersion={{.Env.GO_VERSION}}
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ endif
TEST_FLAGS ?=

build-cli:
go build -o bin/k3ai-cli
go build -o bin/k3ai

.PHONY: lint
lint: check-format
Expand Down
2 changes: 1 addition & 1 deletion cmd/tools/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"os"
)

const k3aiBinaryName = "k3ai-cli"
const k3aiBinaryName = "k3ai"

var rootCmd = &cobra.Command{
Use: k3aiBinaryName,
Expand Down
8 changes: 4 additions & 4 deletions cmd/tools/cli/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ func newInitCommand() *cobra.Command {
Use: "init",
Short: "Initialize K3ai Client",
Long: `Initialize K3ai Client, allowing user to deploy a new K8's cluster, list plugins and groups`,
Example: `k3ai-cli init #Will use config from $HOME/.k3ai/config.yaml and use interactive menus
k3ai-cli init --config /myfolder/myconfig.yaml #Use a custom config.yaml in another location(local or remote)
k3ai-cli init --local k3s #Use config target marked local and of type k3s
k3ai-cli init --cloud civo #Use config target marked as cloud and of type civo`,
Example: `k3ai init #Will use config from $HOME/.k3ai/config.yaml and use interactive menus
k3ai init --config /myfolder/myconfig.yaml #Use a custom config.yaml in another location(local or remote)
k3ai init --local k3s #Use config target marked local and of type k3s
k3ai init --cloud civo #Use config target marked as cloud and of type civo`,
SilenceUsage: true,
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/tools/cli/version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package cli

func ExampleprintVersion() {
printVersion()
// Output: k3ai-cli version: dev
// Output: k3ai version: dev
// go version: unknown
// commit: dev
}
4 changes: 2 additions & 2 deletions internal/infra/local/initlocal.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func localAppDeployment(data shared.TargetCustoms, osFlavor string) {
var cmd *exec.Cmd
if osFlavor == "windows" {
for item := range data.Plugins {
cmd = exec.Command("powershell", "k3ai-cli.exe apply ", data.Plugins[item].Name, " --kubectl")
cmd = exec.Command("powershell", "k3ai.exe apply ", data.Plugins[item].Name, " --kubectl")
cmd.Stderr = nil
cmd.Stdin = os.Stdin
cmd.Stdout = nil
Expand All @@ -140,7 +140,7 @@ func localAppDeployment(data shared.TargetCustoms, osFlavor string) {
}
} else {
for item := range data.Plugins {
cmd = exec.Command("bin/sh", "-c", "k3ai-cli.exe apply ", data.Plugins[item].Name, " --kubectl")
cmd = exec.Command("bin/sh", "-c", "k3ai apply ", data.Plugins[item].Name, " --kubectl")
cmd.Stderr = nil
cmd.Stdin = os.Stdin
cmd.Stdout = nil
Expand Down

0 comments on commit 9cf950b

Please sign in to comment.