diff --git a/Makefile b/Makefile index a81f0fb..bb0d4d2 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ VERSION?=`git describe --tags` +DOCBIN?=mkdocs BUILD_DATE := `date +%Y-%m-%d\ %H:%M` VERSIONFILE := version.go @@ -28,7 +29,7 @@ doc: BUILD_DOC=true ./$(BINARY_NAME) publish-doc: - mkdocs gh-deploy + $(DOCBIN) gh-deploy test: build $(GOTEST) -v ./... @@ -69,7 +70,7 @@ gensrc: @echo " BUILD_DATE = \"$(BUILD_DATE)\"" >> $(VERSIONFILE) @echo ")" >> $(VERSIONFILE) -build-release: tidy gensrc build doc publish-doc test windows-build macos-build docker-img-build +build-release: tidy gensrc build doc publish-doc test windows-build macos-build zip dodas.zip dodas zip dodas.exe.zip dodas.exe zip dodas_osx.zip dodas_osx diff --git a/README.md b/README.md index 905ac75..23b5cba 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Download the binary from the latest release on [github](https://github.com/Cloud-PG/dodas-go-client/releases). For instance: ```bash -wget https://github.com/Cloud-PG/dodas-go-client/releases/download/v0.3.2/dodas.zip +wget https://github.com/Cloud-PG/dodas-go-client/releases/download/v0.3.2-patch1/dodas.zip unzip dodas.zip cp dodas /usr/local/bin ``` @@ -19,8 +19,8 @@ cp dodas /usr/local/bin > > Autocompletion for bash and zsh is supported > -> - **bash** add the following line to ~/.bashrc: `. <(dodas completition)` -> - **zsh** add the following line to ~/.zshrc: `source <(dodas zsh-completition)` +> - **bash** add the following line to ~/.bashrc: `. <(dodas autocomplete)` +> - **zsh** add the following line to ~/.zshrc: `source <(dodas zsh-autocomplete)` You can find now a template for creating your client configuration file in [config/client_config.yaml](https://raw.githubusercontent.com/Cloud-PG/dodas-go-client/master/config/client_config.yaml). Note that by default the client will look for `$HOME/.dodas.yaml`. @@ -42,6 +42,13 @@ To list the Infrastructure ID of all your deployments: dodas list infIDs ``` +You can eventually login into a vm in created cluster that has a public IP address with: + +```bash +dodas login +# e.g. dodas login cb585e5c-33b6-11ea-8776-0242ac150003 0 +``` + ## Using docker image In alternative you can create a docker image with the compiled client inside with: diff --git a/cmd/completition.go b/cmd/autocomplete.go similarity index 64% rename from cmd/completition.go rename to cmd/autocomplete.go index 0f2ffb5..4c4d4b5 100644 --- a/cmd/completition.go +++ b/cmd/autocomplete.go @@ -21,35 +21,30 @@ import ( "github.com/spf13/cobra" ) -// completitionCmd represents the completition command -var completitionCmd = &cobra.Command{ - Use: "completition", - Short: "A brief description of your command", - Long: `A longer description that spans multiple lines and likely contains examples -and usage of using your command. For example: - -Cobra is a CLI library for Go that empowers applications. -This application is a tool to generate the needed files -to quickly create a Cobra application.`, +// autocompleteCmd represents the completion command +var autocompleteCmd = &cobra.Command{ + Use: "autocomplete", + Short: "Generate script for bash autocomplete", + Long: `add the following line to ~/.bashrc: . <(dodas autocomplete)`, Run: func(cmd *cobra.Command, args []string) { rootCmd.GenBashCompletion(os.Stdout); //rootCmd.GenZshCompletion(os.Stdout); }, } -// completitionZshCmd represents the completition command -var completitionZshCmd = &cobra.Command{ - Use: "zsh-completition", - Short: "A brief description of your command", - Long: ``, +// autocompleteZshCmd represents the completion command +var autocompleteZshCmd = &cobra.Command{ + Use: "zsh-autocomplete", + Short: "Generate script for zsh autocomplete", + Long: `add the following line to ~/.bashrc: source <(dodas zsh-autocomplete)`, Run: func(cmd *cobra.Command, args []string) { rootCmd.GenZshCompletion(os.Stdout); }, } func init() { - rootCmd.AddCommand(completitionCmd) - rootCmd.AddCommand(completitionZshCmd) + rootCmd.AddCommand(autocompleteCmd) + rootCmd.AddCommand(autocompleteZshCmd) // Here you will define your flags and configuration settings. diff --git a/docs/README.md b/docs/README.md index 905ac75..23b5cba 100644 --- a/docs/README.md +++ b/docs/README.md @@ -10,7 +10,7 @@ Download the binary from the latest release on [github](https://github.com/Cloud-PG/dodas-go-client/releases). For instance: ```bash -wget https://github.com/Cloud-PG/dodas-go-client/releases/download/v0.3.2/dodas.zip +wget https://github.com/Cloud-PG/dodas-go-client/releases/download/v0.3.2-patch1/dodas.zip unzip dodas.zip cp dodas /usr/local/bin ``` @@ -19,8 +19,8 @@ cp dodas /usr/local/bin > > Autocompletion for bash and zsh is supported > -> - **bash** add the following line to ~/.bashrc: `. <(dodas completition)` -> - **zsh** add the following line to ~/.zshrc: `source <(dodas zsh-completition)` +> - **bash** add the following line to ~/.bashrc: `. <(dodas autocomplete)` +> - **zsh** add the following line to ~/.zshrc: `source <(dodas zsh-autocomplete)` You can find now a template for creating your client configuration file in [config/client_config.yaml](https://raw.githubusercontent.com/Cloud-PG/dodas-go-client/master/config/client_config.yaml). Note that by default the client will look for `$HOME/.dodas.yaml`. @@ -42,6 +42,13 @@ To list the Infrastructure ID of all your deployments: dodas list infIDs ``` +You can eventually login into a vm in created cluster that has a public IP address with: + +```bash +dodas login +# e.g. dodas login cb585e5c-33b6-11ea-8776-0242ac150003 0 +``` + ## Using docker image In alternative you can create a docker image with the compiled client inside with: diff --git a/docs/dodas.md b/docs/dodas.md index d19a495..da42ffb 100644 --- a/docs/dodas.md +++ b/docs/dodas.md @@ -30,7 +30,7 @@ dodas [flags] ### SEE ALSO -* [dodas completition](dodas_completition.md) - A brief description of your command +* [dodas autocomplete](dodas_autocomplete.md) - Generate script for bash autocomplete * [dodas create](dodas_create.md) - Create a cluster from a TOSCA template * [dodas destroy](dodas_destroy.md) - Destroy infrastructure with this InfID * [dodas get](dodas_get.md) - Wrapper command for get operations @@ -38,6 +38,6 @@ dodas [flags] * [dodas login](dodas_login.md) - ssh login into a deployed vm * [dodas validate](dodas_validate.md) - Validate your tosca template * [dodas version](dodas_version.md) - Client version -* [dodas zsh-completition](dodas_zsh-completition.md) - A brief description of your command +* [dodas zsh-autocomplete](dodas_zsh-autocomplete.md) - Generate script for zsh autocomplete ###### Auto generated by spf13/cobra on 16-Jan-2020 diff --git a/docs/dodas_autocomplete.md b/docs/dodas_autocomplete.md new file mode 100644 index 0000000..c5f07ea --- /dev/null +++ b/docs/dodas_autocomplete.md @@ -0,0 +1,29 @@ +## dodas autocomplete + +Generate script for bash autocomplete + +### Synopsis + +add the following line to ~/.bashrc: . <(dodas autocomplete) + +``` +dodas autocomplete [flags] +``` + +### Options + +``` + -h, --help help for autocomplete +``` + +### Options inherited from parent commands + +``` + --config string DODAS config file (default is $HOME/.dodas.yaml) +``` + +### SEE ALSO + +* [dodas](dodas.md) - A self-sufficient client for DODAS deployments + +###### Auto generated by spf13/cobra on 16-Jan-2020 diff --git a/docs/dodas_zsh-autocomplete.md b/docs/dodas_zsh-autocomplete.md new file mode 100644 index 0000000..a8cb423 --- /dev/null +++ b/docs/dodas_zsh-autocomplete.md @@ -0,0 +1,29 @@ +## dodas zsh-autocomplete + +Generate script for zsh autocomplete + +### Synopsis + +add the following line to ~/.bashrc: source <(dodas zsh-autocomplete) + +``` +dodas zsh-autocomplete [flags] +``` + +### Options + +``` + -h, --help help for zsh-autocomplete +``` + +### Options inherited from parent commands + +``` + --config string DODAS config file (default is $HOME/.dodas.yaml) +``` + +### SEE ALSO + +* [dodas](dodas.md) - A self-sufficient client for DODAS deployments + +###### Auto generated by spf13/cobra on 16-Jan-2020 diff --git a/version.go b/version.go index a8fc8c3..e5c3e77 100644 --- a/version.go +++ b/version.go @@ -1,5 +1,5 @@ package main const ( - VERSION = "v0.3.2" - BUILD_DATE = "2020-01-16 08:39" + VERSION = "v0.3.2-patch1" + BUILD_DATE = "2020-01-16 09:24" )