Skip to content

Commit

Permalink
Merge branch 'master' into refactor-json
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlosRoGuerra authored Oct 20, 2021
2 parents 8d5a611 + e2fb73e commit 21736d5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 15 deletions.
5 changes: 0 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,7 @@ require (

replace (
github.com/ajg/form => github.com/cezarsa/form v0.0.0-20210510165411-863b166467b9
github.com/docker/docker => github.com/docker/engine v0.0.0-20191121165722-d1d5f6476656

github.com/docker/machine => github.com/cezarsa/machine v0.7.1-0.20190219165632-cdcfd549f935
github.com/rancher/kontainer-engine => github.com/cezarsa/kontainer-engine v0.0.4-dev.0.20190725184110-8b6c46d5dadd
github.com/samalba/dockerclient => github.com/cezarsa/dockerclient v0.0.0-20190924055524-af5052a88081
golang.org/x/sys => golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6
gopkg.in/ahmetb/go-linq.v3 => github.com/ahmetb/go-linq v3.0.0+incompatible
gopkg.in/check.v1 => gopkg.in/check.v1 v1.0.0-20161208181325-20d25e280405
)
10 changes: 1 addition & 9 deletions misc/bash-completion
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,7 @@
# license that can be found in the LICENSE file.

_tsuru() {
local tasks=`tsuru | egrep "^[ ]" | awk -F ' ' '{print $1}'`

if [ ${#COMP_WORDS[@]} -eq 2 ]; then
local current=${COMP_WORDS[COMP_CWORD]}
if [ -n "${current}" ]; then
COMPREPLY=( $(compgen -W "$tasks" $current) )
return
fi
fi
local tasks=`tsuru | egrep -o "^ [^A-Z]*([A-Z]|$)" | sed -e 's/^[[:space:]]*//' | sed -e 's/[[:space:]A-Z]*$//' | sed 's/ /-/g'`

let last_complete=COMP_CWORD-1

Expand Down
11 changes: 10 additions & 1 deletion tsuru/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
)

const (
version = "1.10.0-rc4"
version = "1.10.0"
header = "Supported-Tsuru"
)

Expand All @@ -31,6 +31,7 @@ func buildManager(name string) *cmd.Manager {
return client.RunPlugin(context)
}
m := cmd.BuildBaseManager(name, version, header, lookup)
m.RegisterTopic("app", `App is a program source code running on Tsuru`)
m.Register(&client.AppRun{})
m.Register(&client.AppInfo{})
m.Register(&client.AppCreate{})
Expand All @@ -56,6 +57,9 @@ func buildManager(name string) *cmd.Manager {
m.Register(&client.EnvGet{})
m.Register(&client.EnvSet{})
m.Register(&client.EnvUnset{})
m.RegisterTopic("service", `A service is a well-defined API that tsuru communicates with to provide extra functionality for applications.
Examples of services are MySQL, Redis, MongoDB, etc. tsuru has built-in services, but it is easy to create and add new services to tsuru.
Services aren’t managed by tsuru, but by their creators.`)
m.Register(client.ServiceList{})
m.Register(&client.ServiceInstanceAdd{})
m.Register(&client.ServiceInstanceUpdate{})
Expand All @@ -66,11 +70,14 @@ func buildManager(name string) *cmd.Manager {
m.Register(&client.ServiceInstanceRevoke{})
m.Register(&client.ServiceInstanceBind{})
m.Register(&client.ServiceInstanceUnbind{})

m.RegisterTopic("platform", `A platform is a well-defined pack with installed dependencies for a language or framework that a group of applications will need. A platform might be a container template (Docker image).`)
m.Register(&admin.PlatformList{})
m.Register(&admin.PlatformAdd{})
m.Register(&admin.PlatformUpdate{})
m.Register(&admin.PlatformRemove{})
m.Register(&admin.PlatformInfo{})

m.Register(&client.PluginInstall{})
m.Register(&client.PluginRemove{})
m.Register(&client.PluginList{})
Expand Down Expand Up @@ -161,6 +168,8 @@ func buildManager(name string) *cmd.Manager {
m.Register(&admin.ClusterUpdate{})
m.Register(&admin.ClusterRemove{})
m.Register(&admin.ClusterList{})

m.RegisterTopic("volume", "Volumes allow applications running on tsuru to use external storage volumes mounted on their filesystem.")
m.Register(&client.VolumeCreate{})
m.Register(&client.VolumeUpdate{})
m.Register(&client.VolumeList{})
Expand Down

0 comments on commit 21736d5

Please sign in to comment.