docs: short aliases [ci skip]

This commit is contained in:
2021-09-05 01:34:56 +02:00
parent a3a66ef972
commit 317be4cc01
19 changed files with 53 additions and 20 deletions

View File

@ -26,6 +26,8 @@ var backupAllServicesFlag = &cli.BoolFlag{
var appBackupCommand = &cli.Command{
Name: "backup",
Usage: "Backup an app",
Aliases: []string{"b"},
Flags: []cli.Flag{backupAllServicesFlag},
ArgsUsage: "<service>",
Action: func(c *cli.Context) error {

View File

@ -14,6 +14,8 @@ import (
var appCheckCommand = &cli.Command{
Name: "check",
Usage: "Check if app is configured correctly",
Aliases: []string{"c"},
ArgsUsage: "<service>",
Action: func(c *cli.Context) error {
appName := c.Args().First()

View File

@ -13,8 +13,9 @@ import (
)
var appConfigCommand = &cli.Command{
Name: "config",
Usage: "edit app environment config",
Name: "config",
Aliases: []string{"c"},
Usage: "Edit app config",
Action: func(c *cli.Context) error {
appName := c.Args().First()
if appName == "" {

View File

@ -19,8 +19,9 @@ import (
var appCpCommand = &cli.Command{
Name: "cp",
Aliases: []string{"c"},
ArgsUsage: "<src> <dst>",
Usage: "copy files to/from running service container",
Usage: "Copy files to/from a running app service",
Action: func(c *cli.Context) error {
appName := c.Args().First()
if appName == "" {

View File

@ -13,8 +13,9 @@ import (
)
var appDeployCommand = &cli.Command{
Name: "deploy",
Usage: "Deploy an app",
Name: "deploy",
Aliases: []string{"d"},
Usage: "Deploy an app",
Action: func(c *cli.Context) error {
appName := c.Args().First()
if appName == "" {

View File

@ -60,8 +60,9 @@ func stackLogs(stackName string, client *dockerClient.Client) {
var appLogsCommand = &cli.Command{
Name: "logs",
Aliases: []string{"l"},
ArgsUsage: "[<service>]",
Usage: "tail app logs",
Usage: "Tail app logs",
Action: func(c *cli.Context) error {
appName := c.Args().First()
if appName == "" {

View File

@ -67,6 +67,7 @@ on your $PATH.
var appNewCommand = &cli.Command{
Name: "new",
Usage: "Create a new app",
Aliases: []string{"n"},
Description: appNewDescription,
Flags: []cli.Flag{
newAppServerFlag,

View File

@ -17,7 +17,9 @@ import (
)
var appPsCommand = &cli.Command{
Name: "ps",
Name: "ps",
Usage: "Check app status",
Aliases: []string{"p"},
Action: func(c *cli.Context) error {
appName := c.Args().First()
if appName == "" {

View File

@ -29,7 +29,7 @@ var VolumesFlag = &cli.BoolFlag{
var appRemoveCommand = &cli.Command{
Name: "remove",
Usage: "Remove an already undeployed app",
Aliases: []string{"rm", "delete"},
Aliases: []string{"rm"},
Flags: []cli.Flag{
VolumesFlag,
internal.ForceFlag,

View File

@ -26,6 +26,8 @@ var restoreAllServicesFlag = &cli.BoolFlag{
var appRestoreCommand = &cli.Command{
Name: "restore",
Usage: "Restore an app from a backup",
Aliases: []string{"r"},
Flags: []cli.Flag{restoreAllServicesFlag},
ArgsUsage: "<service> [<backup file>]",
Action: func(c *cli.Context) error {

View File

@ -4,5 +4,7 @@ import "github.com/urfave/cli/v2"
var appRollbackCommand = &cli.Command{
Name: "rollback",
Usage: "Roll an app back to a previous version",
Aliases: []string{"b"},
ArgsUsage: "[<version>]",
}

View File

@ -36,8 +36,9 @@ var appRunCommand = &cli.Command{
noTTYFlag,
userFlag,
},
Aliases: []string{"r"},
ArgsUsage: "<service> <args>...",
Usage: "run a command in a service container",
Usage: "Run a command in a service container",
Action: func(c *cli.Context) error {
appName := c.Args().First()
if appName == "" {

View File

@ -27,6 +27,7 @@ var allSecretsFlag = &cli.BoolFlag{
var appSecretGenerateCommand = &cli.Command{
Name: "generate",
Aliases: []string{"g"},
Usage: "Generate secrets",
ArgsUsage: "<secret> <version>",
Flags: []cli.Flag{allSecretsFlag, internal.PassFlag},
@ -85,6 +86,7 @@ var appSecretGenerateCommand = &cli.Command{
var appSecretInsertCommand = &cli.Command{
Name: "insert",
Aliases: []string{"i"},
Usage: "Insert secret",
Flags: []cli.Flag{internal.PassFlag},
ArgsUsage: "<secret> <version> <data>",
@ -268,6 +270,7 @@ var appSecretLsCommand = &cli.Command{
var appSecretCommand = &cli.Command{
Name: "secret",
Aliases: []string{"s"},
Usage: "Manage app secrets",
ArgsUsage: "<command>",
Subcommands: []*cli.Command{

View File

@ -13,8 +13,14 @@ import (
)
var appUndeployCommand = &cli.Command{
Name: "undeploy",
Usage: "Undeploy an app",
Name: "undeploy",
Aliases: []string{"u"},
Usage: "Undeploy an app",
Description: `
This does not destroy any of the application data. However, you should remain
vigilant, as your swarm installation will consider any previously attached
volumes as eligiblef or pruning once undeployed.
`,
Action: func(c *cli.Context) error {
appName := c.Args().First()
if appName == "" {

View File

@ -42,8 +42,9 @@ func parseVersionLabel(label string) (string, string) {
}
var appVersionCommand = &cli.Command{
Name: "version",
Usage: "show version of all services in app",
Name: "version",
Aliases: []string{"v"},
Usage: "Show version of all services in app",
Action: func(c *cli.Context) error {
appName := c.Args().First()
if appName == "" {

View File

@ -63,7 +63,7 @@ var appVolumeListCommand = &cli.Command{
var appVolumeRemoveCommand = &cli.Command{
Name: "remove",
Usage: "remove volume(s) associated with an app",
Aliases: []string{"rm", "delete"},
Aliases: []string{"rm"},
Flags: []cli.Flag{
internal.ForceFlag,
},
@ -105,7 +105,8 @@ var appVolumeRemoveCommand = &cli.Command{
var appVolumeCommand = &cli.Command{
Name: "volume",
Usage: "List or remove volumes associated with app",
Aliases: []string{"v"},
Usage: "Manage app volumes",
ArgsUsage: "<command>",
Subcommands: []*cli.Command{
appVolumeListCommand,