Skip to content

Commit

Permalink
Merge pull request #4 from lixiaojun629/develop
Browse files Browse the repository at this point in the history
0.1.3
  • Loading branch information
lixiaojun629 authored Oct 9, 2018
2 parents f67337b + 06746b3 commit 907f639
Show file tree
Hide file tree
Showing 240 changed files with 8,922 additions and 3,616 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
## Change Log

v0.1.3
* integrate auto completion.
* Support uhost create, stop, delete and so on.

v0.1.2
* simplify config and completion.

v0.1.1
* UHost list; EIP list,delete and allocate; GlobalSSH list,delete,modify and create.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export VERSION=0.1.2
export VERSION=0.1.3

.PHONY : build
build:
go install && mv ../../../../bin/ucloud-cli ../../../../bin/ucloud
go install && mv ../../../../bin/ucloud-cli /usr/local/bin/ucloud

.PHONY : build_mac
build_mac:
Expand Down
45 changes: 19 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,6 @@ You can use [Homebrew](https://brew.sh/) on macOS or [Linuxbrew](http://linuxbre
```
brew install ucloud
```

##### Download binary file
Archive links:
[Mac](http://ucloud-sdk.ufile.ucloud.com.cn/ucloud-cli-macosx-0.1.2-amd64.tgz)
[Linux](http://ucloud-sdk.ufile.ucloud.com.cn/ucloud-cli-linux-0.1.2-amd64.tgz)
[Windows](http://ucloud-sdk.ufile.ucloud.com.cn/ucloud-cli-windows-0.1.2-amd64.zip)

SHA-256 checksum
```
19b7a0803fc41ee689797a36fd67b288e993c383edf6087f56825a4d5bb17875 ucloud-cli-linux-0.1.2-amd64.tgz
ecc787f4045ea14d583801cd0cfa746be357d50756c2cf0ba879e405c2325d1c ucloud-cli-macosx-0.1.2-amd64.tgz
f48058ac96bb0283b18c660f0350eedba49d03a753775b0a2773b2081698b3f3 ucloud-cli-windows-0.1.2-amd64.zip
```

Download the binary file and extract to /usr/local/bin directory or add it to the $PATH. Take macOS as an example.
```
$ curl -o ucloud-cli.tgz http://ucloud-sdk.ufile.ucloud.com.cn/ucloud-cli-macosx-0.1.2-amd64.tgz
$ echo "ecc787f4045ea14d583801cd0cfa746be357d50756c2cf0ba879e405c2325d1c *ucloud-cli-macosx-0.1.2-amd64.tgz" | shasum -a 256 -c
$ tar -zxf ucloud-cli.tgz
$ cp ucloud /usr/local/bin
```
##### Build from source code

If you have installed golang, run the following commands to install the UCloud CLI.
Expand All @@ -45,12 +24,26 @@ $ cd ucloud-cli
$ make install
```

### Uninstall UCloud CLI

Remove the executable file /usr/local/bin/ucloud and the directory $HOME/.ucloud

### Config UCloud CLI

After install the cli, run 'ucloud config' to complete the cli configuration following the tips. Local settings will be saved in directory $HOME/.ucloud
Command 'ucloud ls --object [region|project]' display all the regions and projects. You can change the default region and prject by runing 'ucloud config set [region|project] xxx'.
Execute 'ucloud config --help' for more information.
After install the cli, run 'ucloud init' to complete the cli configuration following the tips. Local settings will be saved in directory $HOME/.ucloud

### Uninstall UCloud CLI
### Auto complete
Run 'ucloud --completion' for help

Remove the executable file /usr/local/bin/ucloud and the directory $HOME/.ucloud
#### Bash shell
Please append the following scripts to file ~/.bash_profile or ~/.bashrc.
```
complete -C /usr/local/bin/ucloud ucloud
```

#### Zsh shell
Please append the following scripts to file ~/.zshrc.
```
autoload -U +X bashcompinit && bashcompinit
complete -F /usr/local/bin/ucloud ucloud
```
Loading

0 comments on commit 907f639

Please sign in to comment.