feat: support alias translation
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
See #627
This commit is contained in:
@ -1,14 +1,20 @@
|
|||||||
package app
|
package app
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"strings"
|
||||||
|
|
||||||
"coopcloud.tech/abra/pkg/i18n"
|
"coopcloud.tech/abra/pkg/i18n"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// translators: `abra app` aliases. use a comma separated list of aliases with
|
||||||
|
// no spaces in between
|
||||||
|
var appAliases = i18n.G("a")
|
||||||
|
|
||||||
var AppCommand = &cobra.Command{
|
var AppCommand = &cobra.Command{
|
||||||
// translators: `app` command group
|
// translators: `app` command group
|
||||||
Use: i18n.G("app [cmd] [args] [flags]"),
|
Use: i18n.G("app [cmd] [args] [flags]"),
|
||||||
Aliases: []string{i18n.G("a")},
|
Aliases: strings.Split(appAliases, ","),
|
||||||
// translators: Short description for `app` command group
|
// translators: Short description for `app` command group
|
||||||
Short: i18n.G("Manage apps"),
|
Short: i18n.G("Manage apps"),
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ package app
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"coopcloud.tech/abra/cli/internal"
|
"coopcloud.tech/abra/cli/internal"
|
||||||
"coopcloud.tech/abra/pkg/autocomplete"
|
"coopcloud.tech/abra/pkg/autocomplete"
|
||||||
@ -11,10 +12,14 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// translators: `abra app backup list` aliases. use a comma separated list of aliases with
|
||||||
|
// no spaces in between
|
||||||
|
var appBackupListAliases = i18n.G("ls")
|
||||||
|
|
||||||
var AppBackupListCommand = &cobra.Command{
|
var AppBackupListCommand = &cobra.Command{
|
||||||
// translators: `app backup list` command
|
// translators: `app backup list` command
|
||||||
Use: i18n.G("list <domain> [flags]"),
|
Use: i18n.G("list <domain> [flags]"),
|
||||||
Aliases: []string{i18n.G("ls")},
|
Aliases: strings.Split(appBackupListAliases, ","),
|
||||||
// translators: Short description for `app backup list` command
|
// translators: Short description for `app backup list` command
|
||||||
Short: i18n.G("List the contents of a snapshot"),
|
Short: i18n.G("List the contents of a snapshot"),
|
||||||
Args: cobra.ExactArgs(1),
|
Args: cobra.ExactArgs(1),
|
||||||
@ -63,10 +68,14 @@ var AppBackupListCommand = &cobra.Command{
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// translators: `abra app backup download` aliases. use a comma separated list of aliases with
|
||||||
|
// no spaces in between
|
||||||
|
var appBackupDownloadAliases = i18n.G("d")
|
||||||
|
|
||||||
var AppBackupDownloadCommand = &cobra.Command{
|
var AppBackupDownloadCommand = &cobra.Command{
|
||||||
// translators: `app backup download` command
|
// translators: `app backup download` command
|
||||||
Use: i18n.G("download <domain> [flags]"),
|
Use: i18n.G("download <domain> [flags]"),
|
||||||
Aliases: []string{i18n.G("d")},
|
Aliases: strings.Split(appBackupDownloadAliases, ","),
|
||||||
// translators: Short description for `app backup download` command
|
// translators: Short description for `app backup download` command
|
||||||
Short: i18n.G("Download a snapshot"),
|
Short: i18n.G("Download a snapshot"),
|
||||||
Long: i18n.G(`Downloads a backup.tar.gz to the current working directory.
|
Long: i18n.G(`Downloads a backup.tar.gz to the current working directory.
|
||||||
@ -134,10 +143,14 @@ var AppBackupDownloadCommand = &cobra.Command{
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// translators: `abra app backup create` aliases. use a comma separated list of aliases with
|
||||||
|
// no spaces in between
|
||||||
|
var appBackupCreateAliases = i18n.G("c")
|
||||||
|
|
||||||
var AppBackupCreateCommand = &cobra.Command{
|
var AppBackupCreateCommand = &cobra.Command{
|
||||||
// translators: `app backup create` command
|
// translators: `app backup create` command
|
||||||
Use: i18n.G("create <domain> [flags]"),
|
Use: i18n.G("create <domain> [flags]"),
|
||||||
Aliases: []string{i18n.G("c")},
|
Aliases: strings.Split(appBackupCreateAliases, ","),
|
||||||
// translators: Short description for `app backup create` command
|
// translators: Short description for `app backup create` command
|
||||||
Short: i18n.G("Create a new snapshot"),
|
Short: i18n.G("Create a new snapshot"),
|
||||||
Args: cobra.ExactArgs(1),
|
Args: cobra.ExactArgs(1),
|
||||||
@ -180,10 +193,14 @@ var AppBackupCreateCommand = &cobra.Command{
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// translators: `abra app backup snapshots` aliases. use a comma separated list of aliases with
|
||||||
|
// no spaces in between
|
||||||
|
var appBackupSnapshotsAliases = i18n.G("s")
|
||||||
|
|
||||||
var AppBackupSnapshotsCommand = &cobra.Command{
|
var AppBackupSnapshotsCommand = &cobra.Command{
|
||||||
// translators: `app backup snapshots` command
|
// translators: `app backup snapshots` command
|
||||||
Use: i18n.G("snapshots <domain> [flags]"),
|
Use: i18n.G("snapshots <domain> [flags]"),
|
||||||
Aliases: []string{i18n.G("s")},
|
Aliases: strings.Split(appBackupSnapshotsAliases, ","),
|
||||||
// translators: Short description for `app backup snapshots` command
|
// translators: Short description for `app backup snapshots` command
|
||||||
Short: i18n.G("List all snapshots"),
|
Short: i18n.G("List all snapshots"),
|
||||||
Args: cobra.ExactArgs(1),
|
Args: cobra.ExactArgs(1),
|
||||||
@ -217,10 +234,14 @@ var AppBackupSnapshotsCommand = &cobra.Command{
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// translators: `abra app backup` aliases. use a comma separated list of aliases with
|
||||||
|
// no spaces in between
|
||||||
|
var appBackupAliases = i18n.G("b")
|
||||||
|
|
||||||
var AppBackupCommand = &cobra.Command{
|
var AppBackupCommand = &cobra.Command{
|
||||||
// translators: `app backup` command group
|
// translators: `app backup` command group
|
||||||
Use: i18n.G("backup [cmd] [args] [flags]"),
|
Use: i18n.G("backup [cmd] [args] [flags]"),
|
||||||
Aliases: []string{i18n.G("b")},
|
Aliases: strings.Split(appBackupAliases, ","),
|
||||||
// translators: Short description for `app backup` command group
|
// translators: Short description for `app backup` command group
|
||||||
Short: i18n.G("Manage app backups"),
|
Short: i18n.G("Manage app backups"),
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ package app
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"coopcloud.tech/abra/cli/internal"
|
"coopcloud.tech/abra/cli/internal"
|
||||||
appPkg "coopcloud.tech/abra/pkg/app"
|
appPkg "coopcloud.tech/abra/pkg/app"
|
||||||
@ -13,10 +14,14 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// translators: `abra app check` aliases. use a comma separated list of aliases with
|
||||||
|
// no spaces in between
|
||||||
|
var appCheckAliases = i18n.G("chk")
|
||||||
|
|
||||||
var AppCheckCommand = &cobra.Command{
|
var AppCheckCommand = &cobra.Command{
|
||||||
// translators: `app check` command
|
// translators: `app check` command
|
||||||
Use: i18n.G("check <domain> [flags]"),
|
Use: i18n.G("check <domain> [flags]"),
|
||||||
Aliases: []string{i18n.G("chk")},
|
Aliases: strings.Split(appCheckAliases, ","),
|
||||||
// translators: Short description for `app check` command
|
// translators: Short description for `app check` command
|
||||||
Short: i18n.G("Ensure an app is well configured"),
|
Short: i18n.G("Ensure an app is well configured"),
|
||||||
Long: i18n.G(`Compare env vars in both the app ".env" and recipe ".env.sample" file.
|
Long: i18n.G(`Compare env vars in both the app ".env" and recipe ".env.sample" file.
|
||||||
|
@ -18,10 +18,14 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// translators: `abra app cmd` aliases. use a comma separated list of aliases with
|
||||||
|
// no spaces in between
|
||||||
|
var appCmdAliases = i18n.G("cmd")
|
||||||
|
|
||||||
var AppCmdCommand = &cobra.Command{
|
var AppCmdCommand = &cobra.Command{
|
||||||
// translators: `app command` command
|
// translators: `app command` command
|
||||||
Use: i18n.G("command <domain> [service | --local] <cmd> [[args] [flags] | [flags] -- [args]]"),
|
Use: i18n.G("command <domain> [service | --local] <cmd> [[args] [flags] | [flags] -- [args]]"),
|
||||||
Aliases: []string{i18n.G("cmd")},
|
Aliases: strings.Split(appCmdAliases, ","),
|
||||||
// translators: Short description for `app cmd` command
|
// translators: Short description for `app cmd` command
|
||||||
Short: i18n.G("Run app commands"),
|
Short: i18n.G("Run app commands"),
|
||||||
Long: i18n.G(`Run an app specific command.
|
Long: i18n.G(`Run an app specific command.
|
||||||
@ -194,10 +198,14 @@ does not).`),
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// translators: `abra app command list` aliases. use a comma separated list of
|
||||||
|
// aliases with no spaces in between
|
||||||
|
var appCmdListAliases = i18n.G("ls")
|
||||||
|
|
||||||
var AppCmdListCommand = &cobra.Command{
|
var AppCmdListCommand = &cobra.Command{
|
||||||
// translators: `app cmd list` command
|
// translators: `app cmd list` command
|
||||||
Use: i18n.G("list <domain> [flags]"),
|
Use: i18n.G("list <domain> [flags]"),
|
||||||
Aliases: []string{i18n.G("ls")},
|
Aliases: strings.Split(appCmdListAliases, ","),
|
||||||
// translators: Short description for `app cmd list` command
|
// translators: Short description for `app cmd list` command
|
||||||
Short: i18n.G("List all available commands"),
|
Short: i18n.G("List all available commands"),
|
||||||
Args: cobra.MinimumNArgs(1),
|
Args: cobra.MinimumNArgs(1),
|
||||||
|
@ -3,6 +3,7 @@ package app
|
|||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
|
"strings"
|
||||||
|
|
||||||
appPkg "coopcloud.tech/abra/pkg/app"
|
appPkg "coopcloud.tech/abra/pkg/app"
|
||||||
"coopcloud.tech/abra/pkg/autocomplete"
|
"coopcloud.tech/abra/pkg/autocomplete"
|
||||||
@ -12,10 +13,14 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// translators: `abra app config` aliases. use a comma separated list of
|
||||||
|
// aliases with no spaces in between
|
||||||
|
var appConfigAliases = i18n.G("cfg")
|
||||||
|
|
||||||
var AppConfigCommand = &cobra.Command{
|
var AppConfigCommand = &cobra.Command{
|
||||||
// translators: `app config` command
|
// translators: `app config` command
|
||||||
Use: i18n.G("config <domain> [flags]"),
|
Use: i18n.G("config <domain> [flags]"),
|
||||||
Aliases: []string{i18n.G("cfg")},
|
Aliases: strings.Split(appConfigAliases, ","),
|
||||||
// translators: Short description for `app config` command
|
// translators: Short description for `app config` command
|
||||||
Short: i18n.G("Edit app config"),
|
Short: i18n.G("Edit app config"),
|
||||||
Example: i18n.G(" abra config 1312.net"),
|
Example: i18n.G(" abra config 1312.net"),
|
||||||
|
@ -25,10 +25,14 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// translators: `abra app cp` aliases. use a comma separated list of aliases with
|
||||||
|
// no spaces in between
|
||||||
|
var appCpAliases = i18n.G("c")
|
||||||
|
|
||||||
var AppCpCommand = &cobra.Command{
|
var AppCpCommand = &cobra.Command{
|
||||||
// translators: `app cp` command
|
// translators: `app cp` command
|
||||||
Use: i18n.G("cp <domain> <src> <dst> [flags]"),
|
Use: i18n.G("cp <domain> <src> <dst> [flags]"),
|
||||||
Aliases: []string{i18n.G("c")},
|
Aliases: strings.Split(appCpAliases, ","),
|
||||||
// translators: Short description for `app cp` command
|
// translators: Short description for `app cp` command
|
||||||
Short: i18n.G("Copy files to/from a deployed app service"),
|
Short: i18n.G("Copy files to/from a deployed app service"),
|
||||||
Example: i18n.G(` # copy myfile.txt to the root of the app service
|
Example: i18n.G(` # copy myfile.txt to the root of the app service
|
||||||
|
@ -24,10 +24,14 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// translators: `abra app deploy` aliases. use a comma separated list of aliases with
|
||||||
|
// no spaces in between
|
||||||
|
var appDeployAliases = i18n.G("d")
|
||||||
|
|
||||||
var AppDeployCommand = &cobra.Command{
|
var AppDeployCommand = &cobra.Command{
|
||||||
// translators: `app deploy` command
|
// translators: `app deploy` command
|
||||||
Use: i18n.G("deploy <domain> [version] [flags]"),
|
Use: i18n.G("deploy <domain> [version] [flags]"),
|
||||||
Aliases: []string{i18n.G("d")},
|
Aliases: strings.Split(appDeployAliases, ","),
|
||||||
// translators: Short description for `app deploy` command
|
// translators: Short description for `app deploy` command
|
||||||
Short: i18n.G("Deploy an app"),
|
Short: i18n.G("Deploy an app"),
|
||||||
Long: i18n.G(`Deploy an app.
|
Long: i18n.G(`Deploy an app.
|
||||||
|
@ -3,6 +3,7 @@ package app
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"sort"
|
"sort"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"coopcloud.tech/abra/cli/internal"
|
"coopcloud.tech/abra/cli/internal"
|
||||||
"coopcloud.tech/abra/pkg/autocomplete"
|
"coopcloud.tech/abra/pkg/autocomplete"
|
||||||
@ -11,10 +12,14 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// translators: `abra app env` aliases. use a comma separated list of aliases with
|
||||||
|
// no spaces in between
|
||||||
|
var appEnvAliases = i18n.G("e")
|
||||||
|
|
||||||
var AppEnvCommand = &cobra.Command{
|
var AppEnvCommand = &cobra.Command{
|
||||||
// translators: `app env` command
|
// translators: `app env` command
|
||||||
Use: i18n.G("env <domain> [flags]"),
|
Use: i18n.G("env <domain> [flags]"),
|
||||||
Aliases: []string{i18n.G("e")},
|
Aliases: strings.Split(appEnvAliases, ","),
|
||||||
// translators: Short description for `app env` command
|
// translators: Short description for `app env` command
|
||||||
Short: i18n.G("Show app .env values"),
|
Short: i18n.G("Show app .env values"),
|
||||||
Example: i18n.G(" abra app env 1312.net"),
|
Example: i18n.G(" abra app env 1312.net"),
|
||||||
|
@ -4,6 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"sort"
|
"sort"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"coopcloud.tech/abra/cli/internal"
|
"coopcloud.tech/abra/cli/internal"
|
||||||
"coopcloud.tech/abra/pkg/autocomplete"
|
"coopcloud.tech/abra/pkg/autocomplete"
|
||||||
@ -19,10 +20,14 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// translators: `abra app labels` aliases. use a comma separated list of
|
||||||
|
// aliases with no spaces in between
|
||||||
|
var appLabelsAliases = i18n.G("lb")
|
||||||
|
|
||||||
var AppLabelsCommand = &cobra.Command{
|
var AppLabelsCommand = &cobra.Command{
|
||||||
// translators: `app labels` command
|
// translators: `app labels` command
|
||||||
Use: i18n.G("labels <domain> [flags]"),
|
Use: i18n.G("labels <domain> [flags]"),
|
||||||
Aliases: []string{i18n.G("lb")},
|
Aliases: strings.Split(appLabelsAliases, ","),
|
||||||
// translators: Short description for `app labels` command
|
// translators: Short description for `app labels` command
|
||||||
Short: i18n.G("Show deployment labels"),
|
Short: i18n.G("Show deployment labels"),
|
||||||
Long: i18n.G("Both local recipe and live deployment labels are shown."),
|
Long: i18n.G("Both local recipe and live deployment labels are shown."),
|
||||||
|
@ -39,10 +39,14 @@ type serverStatus struct {
|
|||||||
UpgradeCount int `json:"upgradeCount"`
|
UpgradeCount int `json:"upgradeCount"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// translators: `abra app list` aliases. use a comma separated list of aliases with
|
||||||
|
// no spaces in between
|
||||||
|
var appListAliases = i18n.G("ls")
|
||||||
|
|
||||||
var AppListCommand = &cobra.Command{
|
var AppListCommand = &cobra.Command{
|
||||||
// translators: `app list` command
|
// translators: `app list` command
|
||||||
Use: i18n.G("list [flags]"),
|
Use: i18n.G("list [flags]"),
|
||||||
Aliases: []string{i18n.G("ls")},
|
Aliases: strings.Split(appListAliases, ","),
|
||||||
// translators: Short description for `app list` command
|
// translators: Short description for `app list` command
|
||||||
Short: i18n.G("List all managed apps"),
|
Short: i18n.G("List all managed apps"),
|
||||||
Long: i18n.G(`Generate a report of all managed apps.
|
Long: i18n.G(`Generate a report of all managed apps.
|
||||||
|
@ -2,6 +2,7 @@ package app
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"coopcloud.tech/abra/cli/internal"
|
"coopcloud.tech/abra/cli/internal"
|
||||||
appPkg "coopcloud.tech/abra/pkg/app"
|
appPkg "coopcloud.tech/abra/pkg/app"
|
||||||
@ -14,10 +15,14 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// translators: `abra app logs` aliases. use a comma separated list of aliases with
|
||||||
|
// no spaces in between
|
||||||
|
var appLogsAliases = i18n.G("l")
|
||||||
|
|
||||||
var AppLogsCommand = &cobra.Command{
|
var AppLogsCommand = &cobra.Command{
|
||||||
// translators: `app logs` command
|
// translators: `app logs` command
|
||||||
Use: i18n.G("logs <domain> [service] [flags]"),
|
Use: i18n.G("logs <domain> [service] [flags]"),
|
||||||
Aliases: []string{i18n.G("l")},
|
Aliases: strings.Split(appLogsAliases, ","),
|
||||||
// translators: Short description for `app logs` command
|
// translators: Short description for `app logs` command
|
||||||
Short: i18n.G("Tail app logs"),
|
Short: i18n.G("Tail app logs"),
|
||||||
Args: cobra.RangeArgs(1, 2),
|
Args: cobra.RangeArgs(1, 2),
|
||||||
|
@ -3,6 +3,7 @@ package app
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"coopcloud.tech/abra/cli/internal"
|
"coopcloud.tech/abra/cli/internal"
|
||||||
"coopcloud.tech/abra/pkg/app"
|
"coopcloud.tech/abra/pkg/app"
|
||||||
@ -42,10 +43,14 @@ You can use the "--pass/-P" to store these generated passwords locally in a
|
|||||||
pass store (see passwordstore.org for more). The pass command must be available
|
pass store (see passwordstore.org for more). The pass command must be available
|
||||||
on your $PATH.`)
|
on your $PATH.`)
|
||||||
|
|
||||||
|
// translators: `abra app new` aliases. use a comma separated list of aliases with
|
||||||
|
// no spaces in between
|
||||||
|
var appNewAliases = i18n.G("n")
|
||||||
|
|
||||||
var AppNewCommand = &cobra.Command{
|
var AppNewCommand = &cobra.Command{
|
||||||
// translators: `app new` command
|
// translators: `app new` command
|
||||||
Use: i18n.G("new [recipe] [version] [flags]"),
|
Use: i18n.G("new [recipe] [version] [flags]"),
|
||||||
Aliases: []string{i18n.G("n")},
|
Aliases: strings.Split(appNewAliases, ","),
|
||||||
// translators: Short description for `app new` command
|
// translators: Short description for `app new` command
|
||||||
Short: i18n.G("Create a new app"),
|
Short: i18n.G("Create a new app"),
|
||||||
Long: appNewDescription,
|
Long: appNewDescription,
|
||||||
|
@ -24,10 +24,14 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// translators: `abra app ps` aliases. use a comma separated list of aliases
|
||||||
|
// with no spaces in between
|
||||||
|
var appPsAliases = i18n.G("p")
|
||||||
|
|
||||||
var AppPsCommand = &cobra.Command{
|
var AppPsCommand = &cobra.Command{
|
||||||
// translators: `app ps` command
|
// translators: `app ps` command
|
||||||
Use: i18n.G("ps <domain> [flags]"),
|
Use: i18n.G("ps <domain> [flags]"),
|
||||||
Aliases: []string{i18n.G("p")},
|
Aliases: strings.Split(appPsAliases, ","),
|
||||||
// translators: Short description for `app ps` command
|
// translators: Short description for `app ps` command
|
||||||
Short: i18n.G("Check app deployment status"),
|
Short: i18n.G("Check app deployment status"),
|
||||||
Args: cobra.ExactArgs(1),
|
Args: cobra.ExactArgs(1),
|
||||||
|
@ -3,6 +3,7 @@ package app
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"os"
|
"os"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"coopcloud.tech/abra/cli/internal"
|
"coopcloud.tech/abra/cli/internal"
|
||||||
"coopcloud.tech/abra/pkg/autocomplete"
|
"coopcloud.tech/abra/pkg/autocomplete"
|
||||||
@ -15,10 +16,14 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// translators: `abra app remove` aliases. use a comma separated list of aliases with
|
||||||
|
// no spaces in between
|
||||||
|
var appRemoveAliases = i18n.G("rm")
|
||||||
|
|
||||||
var AppRemoveCommand = &cobra.Command{
|
var AppRemoveCommand = &cobra.Command{
|
||||||
// translators: `app remove` command
|
// translators: `app remove` command
|
||||||
Use: i18n.G("remove <domain> [flags]"),
|
Use: i18n.G("remove <domain> [flags]"),
|
||||||
Aliases: []string{i18n.G("rm")},
|
Aliases: strings.Split(appRemoveAliases, ","),
|
||||||
// translators: Short description for `app remove` command
|
// translators: Short description for `app remove` command
|
||||||
Short: i18n.G("Remove all app data, locally and remotely"),
|
Short: i18n.G("Remove all app data, locally and remotely"),
|
||||||
Long: i18n.G(`Remove everything related to an app which is already undeployed.
|
Long: i18n.G(`Remove everything related to an app which is already undeployed.
|
||||||
|
@ -3,6 +3,7 @@ package app
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"coopcloud.tech/abra/cli/internal"
|
"coopcloud.tech/abra/cli/internal"
|
||||||
appPkg "coopcloud.tech/abra/pkg/app"
|
appPkg "coopcloud.tech/abra/pkg/app"
|
||||||
@ -17,10 +18,14 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// translators: `abra app restart` aliases. use a comma separated list of aliases with
|
||||||
|
// no spaces in between
|
||||||
|
var appRestartAliases = i18n.G("re")
|
||||||
|
|
||||||
var AppRestartCommand = &cobra.Command{
|
var AppRestartCommand = &cobra.Command{
|
||||||
// translators: `app restart` command
|
// translators: `app restart` command
|
||||||
Use: i18n.G("restart <domain> [[service] | --all-services] [flags]"),
|
Use: i18n.G("restart <domain> [[service] | --all-services] [flags]"),
|
||||||
Aliases: []string{i18n.G("re")},
|
Aliases: strings.Split(appRestartAliases, ","),
|
||||||
// translators: Short description for `app restart` command
|
// translators: Short description for `app restart` command
|
||||||
Short: i18n.G("Restart an app"),
|
Short: i18n.G("Restart an app"),
|
||||||
Long: i18n.G(`This command restarts services within a deployed app.
|
Long: i18n.G(`This command restarts services within a deployed app.
|
||||||
|
@ -12,10 +12,14 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// translators: `abra app restore` aliases. use a comma separated list of
|
||||||
|
// aliases with no spaces in between
|
||||||
|
var appRestoreAliases = i18n.G("rs")
|
||||||
|
|
||||||
var AppRestoreCommand = &cobra.Command{
|
var AppRestoreCommand = &cobra.Command{
|
||||||
// translators: `app restore` command
|
// translators: `app restore` command
|
||||||
Use: i18n.G("restore <domain> [flags]"),
|
Use: i18n.G("restore <domain> [flags]"),
|
||||||
Aliases: []string{i18n.G("rs")},
|
Aliases: strings.Split(appRestoreAliases, ","),
|
||||||
// translators: Short description for `app restore` command
|
// translators: Short description for `app restore` command
|
||||||
Short: i18n.G("Restore a snapshot"),
|
Short: i18n.G("Restore a snapshot"),
|
||||||
Long: i18n.G(`Snapshots are restored while apps are deployed.
|
Long: i18n.G(`Snapshots are restored while apps are deployed.
|
||||||
|
@ -2,6 +2,7 @@ package app
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"coopcloud.tech/abra/pkg/app"
|
"coopcloud.tech/abra/pkg/app"
|
||||||
appPkg "coopcloud.tech/abra/pkg/app"
|
appPkg "coopcloud.tech/abra/pkg/app"
|
||||||
@ -21,10 +22,14 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// translators: `abra app rollback` aliases. use a comma separated list of
|
||||||
|
// aliases with no spaces in between
|
||||||
|
var appRollbackAliases = i18n.G("rl")
|
||||||
|
|
||||||
var AppRollbackCommand = &cobra.Command{
|
var AppRollbackCommand = &cobra.Command{
|
||||||
// translators: `app rollback` command
|
// translators: `app rollback` command
|
||||||
Use: i18n.G("rollback <domain> [version] [flags]"),
|
Use: i18n.G("rollback <domain> [version] [flags]"),
|
||||||
Aliases: []string{i18n.G("rl")},
|
Aliases: strings.Split(appRollbackAliases, ","),
|
||||||
// translators: Short description for `app rollback` command
|
// translators: Short description for `app rollback` command
|
||||||
Short: i18n.G("Roll an app back to a previous version"),
|
Short: i18n.G("Roll an app back to a previous version"),
|
||||||
Long: i18n.G(`This command rolls an app back to a previous version.
|
Long: i18n.G(`This command rolls an app back to a previous version.
|
||||||
|
@ -3,6 +3,7 @@ package app
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"coopcloud.tech/abra/cli/internal"
|
"coopcloud.tech/abra/cli/internal"
|
||||||
"coopcloud.tech/abra/pkg/autocomplete"
|
"coopcloud.tech/abra/pkg/autocomplete"
|
||||||
@ -17,10 +18,14 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// translators: `abra app run` aliases. use a comma separated list of aliases
|
||||||
|
// with no spaces in between
|
||||||
|
var appRunAliases = i18n.G("r")
|
||||||
|
|
||||||
var AppRunCommand = &cobra.Command{
|
var AppRunCommand = &cobra.Command{
|
||||||
// translators: `app run` command
|
// translators: `app run` command
|
||||||
Use: i18n.G("run <domain> <service> <cmd> [[args] [flags] | [flags] -- [args]]"),
|
Use: i18n.G("run <domain> <service> <cmd> [[args] [flags] | [flags] -- [args]]"),
|
||||||
Aliases: []string{i18n.G("r")},
|
Aliases: strings.Split(appRunAliases, ","),
|
||||||
// translators: Short description for `app run` command
|
// translators: Short description for `app run` command
|
||||||
Short: i18n.G("Run a command inside a service container"),
|
Short: i18n.G("Run a command inside a service container"),
|
||||||
Example: i18n.G(` # run <cmd> with args/flags
|
Example: i18n.G(` # run <cmd> with args/flags
|
||||||
|
@ -24,10 +24,14 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// translators: `abra app secret generate` aliases. use a comma separated list of aliases with
|
||||||
|
// no spaces in between
|
||||||
|
var appSecretGenerateAliases = i18n.G("g")
|
||||||
|
|
||||||
var AppSecretGenerateCommand = &cobra.Command{
|
var AppSecretGenerateCommand = &cobra.Command{
|
||||||
// translators: `app secret generate` command
|
// translators: `app secret generate` command
|
||||||
Use: i18n.G("generate <domain> [[secret] [version] | --all] [flags]"),
|
Use: i18n.G("generate <domain> [[secret] [version] | --all] [flags]"),
|
||||||
Aliases: []string{i18n.G("g")},
|
Aliases: strings.Split(appSecretGenerateAliases, ","),
|
||||||
// translators: Short description for `app secret generate` command
|
// translators: Short description for `app secret generate` command
|
||||||
Short: i18n.G("Generate secrets"),
|
Short: i18n.G("Generate secrets"),
|
||||||
Args: cobra.RangeArgs(1, 3),
|
Args: cobra.RangeArgs(1, 3),
|
||||||
@ -146,10 +150,14 @@ var AppSecretGenerateCommand = &cobra.Command{
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// translators: `abra app secret insert` aliases. use a comma separated list of aliases with
|
||||||
|
// no spaces in between
|
||||||
|
var appSecretInsertAliases = i18n.G("i")
|
||||||
|
|
||||||
var AppSecretInsertCommand = &cobra.Command{
|
var AppSecretInsertCommand = &cobra.Command{
|
||||||
// translators: `app secret insert` command
|
// translators: `app secret insert` command
|
||||||
Use: i18n.G("insert <domain> <secret> <version> [<data>] [flags]"),
|
Use: i18n.G("insert <domain> <secret> <version> [<data>] [flags]"),
|
||||||
Aliases: []string{i18n.G("i")},
|
Aliases: strings.Split(appSecretInsertAliases, ","),
|
||||||
// translators: Short description for `app secret insert` command
|
// translators: Short description for `app secret insert` command
|
||||||
Short: i18n.G("Insert secret"),
|
Short: i18n.G("Insert secret"),
|
||||||
Long: i18n.G(`This command inserts a secret into an app environment.
|
Long: i18n.G(`This command inserts a secret into an app environment.
|
||||||
@ -321,10 +329,14 @@ func secretRm(cl *dockerClient.Client, app appPkg.App, secretName, parsed string
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// translators: `abra app secret remove` aliases. use a comma separated list of aliases with
|
||||||
|
// no spaces in between
|
||||||
|
var appSecretRemoveAliases = i18n.G("rm")
|
||||||
|
|
||||||
var AppSecretRmCommand = &cobra.Command{
|
var AppSecretRmCommand = &cobra.Command{
|
||||||
// translators: `app secret remove` command
|
// translators: `app secret remove` command
|
||||||
Use: i18n.G("remove <domain> [[secret] | --all] [flags]"),
|
Use: i18n.G("remove <domain> [[secret] | --all] [flags]"),
|
||||||
Aliases: []string{i18n.G("rm")},
|
Aliases: strings.Split(appSecretRemoveAliases, ","),
|
||||||
// translators: Short description for `app secret remove` command
|
// translators: Short description for `app secret remove` command
|
||||||
Short: i18n.G("Remove a secret"),
|
Short: i18n.G("Remove a secret"),
|
||||||
Long: i18n.G(`This command removes a secret from an app environment.
|
Long: i18n.G(`This command removes a secret from an app environment.
|
||||||
@ -436,10 +448,14 @@ match those configured in the recipe beforehand.`),
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// translators: `abra app secret ls` aliases. use a comma separated list of aliases with
|
||||||
|
// no spaces in between
|
||||||
|
var appSecretLsAliases = i18n.G("ls")
|
||||||
|
|
||||||
var AppSecretLsCommand = &cobra.Command{
|
var AppSecretLsCommand = &cobra.Command{
|
||||||
// translators: `app secret list` command
|
// translators: `app secret list` command
|
||||||
Use: i18n.G("list <domain>"),
|
Use: i18n.G("list <domain>"),
|
||||||
Aliases: []string{i18n.G("ls")},
|
Aliases: strings.Split(appSecretLsAliases, ","),
|
||||||
// translators: Short description for `app secret list` command
|
// translators: Short description for `app secret list` command
|
||||||
Short: i18n.G("List all secrets"),
|
Short: i18n.G("List all secrets"),
|
||||||
Args: cobra.MinimumNArgs(1),
|
Args: cobra.MinimumNArgs(1),
|
||||||
|
@ -17,10 +17,14 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// translators: `abra app services` aliases. use a comma separated list of
|
||||||
|
// aliases with no spaces in between
|
||||||
|
var appServicesAliases = i18n.G("sr")
|
||||||
|
|
||||||
var AppServicesCommand = &cobra.Command{
|
var AppServicesCommand = &cobra.Command{
|
||||||
// translators: `app services` command
|
// translators: `app services` command
|
||||||
Use: i18n.G("services <domain> [flags]"),
|
Use: i18n.G("services <domain> [flags]"),
|
||||||
Aliases: []string{i18n.G("sr")},
|
Aliases: strings.Split(appServicesAliases, ","),
|
||||||
// translators: Short description for `app services` command
|
// translators: Short description for `app services` command
|
||||||
Short: i18n.G("Display all services of an app"),
|
Short: i18n.G("Display all services of an app"),
|
||||||
Args: cobra.ExactArgs(1),
|
Args: cobra.ExactArgs(1),
|
||||||
|
@ -3,6 +3,7 @@ package app
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"coopcloud.tech/abra/cli/internal"
|
"coopcloud.tech/abra/cli/internal"
|
||||||
appPkg "coopcloud.tech/abra/pkg/app"
|
appPkg "coopcloud.tech/abra/pkg/app"
|
||||||
@ -18,12 +19,15 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// translators: `abra app undeploy` aliases. use a comma separated list of aliases with
|
||||||
|
// no spaces in between
|
||||||
|
var appUndeployAliases = i18n.G("un")
|
||||||
|
|
||||||
var AppUndeployCommand = &cobra.Command{
|
var AppUndeployCommand = &cobra.Command{
|
||||||
// translators: `app undeploy` command
|
// translators: `app undeploy` command
|
||||||
Use: i18n.G("undeploy <domain> [flags]"),
|
Use: i18n.G("undeploy <domain> [flags]"),
|
||||||
Aliases: []string{i18n.G("un")},
|
|
||||||
// translators: Short description for `app undeploy` command
|
// translators: Short description for `app undeploy` command
|
||||||
Short: i18n.G("Undeploy an app"),
|
Aliases: strings.Split(appUndeployAliases, ","),
|
||||||
Long: i18n.G(`This does not destroy any application data.
|
Long: i18n.G(`This does not destroy any application data.
|
||||||
|
|
||||||
However, you should remain vigilant, as your swarm installation will consider
|
However, you should remain vigilant, as your swarm installation will consider
|
||||||
|
@ -25,10 +25,14 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// translators: `abra app upgrade` aliases. use a comma separated list of aliases with
|
||||||
|
// no spaces in between
|
||||||
|
var appUpgradeAliases = i18n.G("up")
|
||||||
|
|
||||||
var AppUpgradeCommand = &cobra.Command{
|
var AppUpgradeCommand = &cobra.Command{
|
||||||
// translators: `app upgrade` command
|
// translators: `app upgrade` command
|
||||||
Use: i18n.G("upgrade <domain> [version] [flags]"),
|
Use: i18n.G("upgrade <domain> [version] [flags]"),
|
||||||
Aliases: []string{i18n.G("up")},
|
Aliases: strings.Split(appUpgradeAliases, ","),
|
||||||
// translators: Short description for `app upgrade` command
|
// translators: Short description for `app upgrade` command
|
||||||
Short: i18n.G("Upgrade an app"),
|
Short: i18n.G("Upgrade an app"),
|
||||||
Long: i18n.G(`Upgrade an app.
|
Long: i18n.G(`Upgrade an app.
|
||||||
|
@ -3,6 +3,7 @@ package app
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"coopcloud.tech/abra/cli/internal"
|
"coopcloud.tech/abra/cli/internal"
|
||||||
"coopcloud.tech/abra/pkg/autocomplete"
|
"coopcloud.tech/abra/pkg/autocomplete"
|
||||||
@ -15,10 +16,14 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// translators: `abra app volume list` aliases. use a comma separated list of aliases with
|
||||||
|
// no spaces in between
|
||||||
|
var appVolumeListAliases = i18n.G("ls")
|
||||||
|
|
||||||
var AppVolumeListCommand = &cobra.Command{
|
var AppVolumeListCommand = &cobra.Command{
|
||||||
// translators: `app volume list` command
|
// translators: `app volume list` command
|
||||||
Use: i18n.G("list <domain> [flags]"),
|
Use: i18n.G("list <domain> [flags]"),
|
||||||
Aliases: []string{i18n.G("ls")},
|
Aliases: strings.Split(appVolumeListAliases, ","),
|
||||||
// translators: Short description for `app list` command
|
// translators: Short description for `app list` command
|
||||||
Short: i18n.G("List volumes associated with an app"),
|
Short: i18n.G("List volumes associated with an app"),
|
||||||
Args: cobra.ExactArgs(1),
|
Args: cobra.ExactArgs(1),
|
||||||
@ -74,6 +79,10 @@ var AppVolumeListCommand = &cobra.Command{
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// translators: `abra app volume remove` aliases. use a comma separated list of aliases with
|
||||||
|
// no spaces in between
|
||||||
|
var appVolumeRemoveAliases = i18n.G("rm")
|
||||||
|
|
||||||
var AppVolumeRemoveCommand = &cobra.Command{
|
var AppVolumeRemoveCommand = &cobra.Command{
|
||||||
// translators: `app volume remove` command
|
// translators: `app volume remove` command
|
||||||
Use: i18n.G("remove <domain> [volume] [flags]"),
|
Use: i18n.G("remove <domain> [volume] [flags]"),
|
||||||
@ -94,7 +103,7 @@ Passing "--force/-f" will select all volumes for removal. Be careful.`),
|
|||||||
|
|
||||||
# delete specific volume
|
# delete specific volume
|
||||||
abra app volume rm 1312.net my_volume`),
|
abra app volume rm 1312.net my_volume`),
|
||||||
Aliases: []string{i18n.G("rm")},
|
Aliases: strings.Split(appVolumeRemoveAliases, ","),
|
||||||
Args: cobra.MinimumNArgs(1),
|
Args: cobra.MinimumNArgs(1),
|
||||||
ValidArgsFunction: func(
|
ValidArgsFunction: func(
|
||||||
cmd *cobra.Command,
|
cmd *cobra.Command,
|
||||||
@ -190,10 +199,14 @@ Passing "--force/-f" will select all volumes for removal. Be careful.`),
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// translators: `abra app volume` aliases. use a comma separated list of aliases with
|
||||||
|
// no spaces in between
|
||||||
|
var appVolumeAliases = i18n.G("vl")
|
||||||
|
|
||||||
var AppVolumeCommand = &cobra.Command{
|
var AppVolumeCommand = &cobra.Command{
|
||||||
// translators: `app volume` command group
|
// translators: `app volume` command group
|
||||||
Use: i18n.G("volume [cmd] [args] [flags]"),
|
Use: i18n.G("volume [cmd] [args] [flags]"),
|
||||||
Aliases: []string{i18n.G("vl")},
|
Aliases: strings.Split(appVolumeAliases, ","),
|
||||||
Short: i18n.G("Manage app volumes"),
|
Short: i18n.G("Manage app volumes"),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
"slices"
|
"slices"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"coopcloud.tech/abra/cli/internal"
|
"coopcloud.tech/abra/cli/internal"
|
||||||
"coopcloud.tech/abra/pkg/autocomplete"
|
"coopcloud.tech/abra/pkg/autocomplete"
|
||||||
@ -21,10 +22,14 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// translators: `abra catalogue sync` aliases. use a comma separated list of aliases with
|
||||||
|
// no spaces in between
|
||||||
|
var appCatalogueSyncAliases = i18n.G("s")
|
||||||
|
|
||||||
var CatalogueSyncCommand = &cobra.Command{
|
var CatalogueSyncCommand = &cobra.Command{
|
||||||
// translators: `catalogue sync` command
|
// translators: `catalogue sync` command
|
||||||
Use: i18n.G("sync [flags]"),
|
Use: i18n.G("sync [flags]"),
|
||||||
Aliases: []string{i18n.G("g")},
|
Aliases: strings.Split(appCatalogueSyncAliases, ","),
|
||||||
// translators: Short description for `catalogue sync` command
|
// translators: Short description for `catalogue sync` command
|
||||||
Short: i18n.G("Sync recipe catalogue for latest changes"),
|
Short: i18n.G("Sync recipe catalogue for latest changes"),
|
||||||
Args: cobra.NoArgs,
|
Args: cobra.NoArgs,
|
||||||
@ -41,10 +46,14 @@ var CatalogueSyncCommand = &cobra.Command{
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// translators: `abra catalogue` aliases. use a comma separated list of aliases with
|
||||||
|
// no spaces in between
|
||||||
|
var appCatalogueAliases = i18n.G("g")
|
||||||
|
|
||||||
var CatalogueGenerateCommand = &cobra.Command{
|
var CatalogueGenerateCommand = &cobra.Command{
|
||||||
// translators: `catalogue generate` command
|
// translators: `catalogue generate` command
|
||||||
Use: i18n.G("generate [recipe] [flags]"),
|
Use: i18n.G("generate [recipe] [flags]"),
|
||||||
Aliases: []string{i18n.G("g")},
|
Aliases: strings.Split(appCatalogueAliases, ","),
|
||||||
// translators: Short description for `catalogue generate` command
|
// translators: Short description for `catalogue generate` command
|
||||||
Short: i18n.G("Generate the recipe catalogue"),
|
Short: i18n.G("Generate the recipe catalogue"),
|
||||||
Long: i18n.G(`Generate a new copy of the recipe catalogue.
|
Long: i18n.G(`Generate a new copy of the recipe catalogue.
|
||||||
|
@ -2,14 +2,20 @@ package cli
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"coopcloud.tech/abra/pkg/i18n"
|
"coopcloud.tech/abra/pkg/i18n"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// translators: `abra autocomplete` aliases. use a comma separated list of
|
||||||
|
// aliases with no spaces in between
|
||||||
|
var autocompleteAliases = i18n.G("ac")
|
||||||
|
|
||||||
var AutocompleteCommand = &cobra.Command{
|
var AutocompleteCommand = &cobra.Command{
|
||||||
// translators: `autocomplete` command
|
// translators: `autocomplete` command
|
||||||
Use: i18n.G("autocomplete [bash|zsh|fish|powershell]"),
|
Use: i18n.G("autocomplete [bash|zsh|fish|powershell]"),
|
||||||
|
Aliases: strings.Split(autocompleteAliases, ","),
|
||||||
// translators: Short description for `autocomplete` command
|
// translators: Short description for `autocomplete` command
|
||||||
Short: i18n.G("Generate autocompletion script"),
|
Short: i18n.G("Generate autocompletion script"),
|
||||||
Long: i18n.G(`To load completions:
|
Long: i18n.G(`To load completions:
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package recipe
|
package recipe
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"strings"
|
||||||
|
|
||||||
"coopcloud.tech/abra/cli/internal"
|
"coopcloud.tech/abra/cli/internal"
|
||||||
"coopcloud.tech/abra/pkg/autocomplete"
|
"coopcloud.tech/abra/pkg/autocomplete"
|
||||||
gitPkg "coopcloud.tech/abra/pkg/git"
|
gitPkg "coopcloud.tech/abra/pkg/git"
|
||||||
@ -9,10 +11,14 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// translators: `abra recipe diff` aliases. use a comma separated list of aliases
|
||||||
|
// with no spaces in between
|
||||||
|
var recipeDiffAliases = i18n.G("d")
|
||||||
|
|
||||||
var RecipeDiffCommand = &cobra.Command{
|
var RecipeDiffCommand = &cobra.Command{
|
||||||
// translators: `recipe diff` command
|
// translators: `recipe diff` command
|
||||||
Use: i18n.G("diff <recipe> [flags]"),
|
Use: i18n.G("diff <recipe> [flags]"),
|
||||||
Aliases: []string{i18n.G("d")},
|
Aliases: strings.Split(recipeDiffAliases, ","),
|
||||||
// translators: Short description for `recipe diff` command
|
// translators: Short description for `recipe diff` command
|
||||||
Short: i18n.G("Show unstaged changes in recipe config"),
|
Short: i18n.G("Show unstaged changes in recipe config"),
|
||||||
Long: i18n.G("This command requires /usr/bin/git."),
|
Long: i18n.G("This command requires /usr/bin/git."),
|
||||||
|
@ -2,6 +2,7 @@ package recipe
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"coopcloud.tech/abra/cli/internal"
|
"coopcloud.tech/abra/cli/internal"
|
||||||
"coopcloud.tech/abra/pkg/autocomplete"
|
"coopcloud.tech/abra/pkg/autocomplete"
|
||||||
@ -14,10 +15,14 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// translators: `abra recipe fetch` aliases. use a comma separated list of aliases
|
||||||
|
// with no spaces in between
|
||||||
|
var recipeFetchAliases = i18n.G("f")
|
||||||
|
|
||||||
var RecipeFetchCommand = &cobra.Command{
|
var RecipeFetchCommand = &cobra.Command{
|
||||||
// translators: `recipe fetch` command
|
// translators: `recipe fetch` command
|
||||||
Use: i18n.G("fetch [recipe | --all] [flags]"),
|
Use: i18n.G("fetch [recipe | --all] [flags]"),
|
||||||
Aliases: []string{i18n.G("f")},
|
Aliases: strings.Split(recipeFetchAliases, ","),
|
||||||
// translators: Short description for `recipe fetch` command
|
// translators: Short description for `recipe fetch` command
|
||||||
Short: i18n.G("Clone recipe(s) locally"),
|
Short: i18n.G("Clone recipe(s) locally"),
|
||||||
Long: i18n.G(`Using "--force/-f" Git syncs an existing recipe. It does not erase unstaged changes.`),
|
Long: i18n.G(`Using "--force/-f" Git syncs an existing recipe. It does not erase unstaged changes.`),
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package recipe
|
package recipe
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"strings"
|
||||||
|
|
||||||
"coopcloud.tech/abra/cli/internal"
|
"coopcloud.tech/abra/cli/internal"
|
||||||
"coopcloud.tech/abra/pkg/autocomplete"
|
"coopcloud.tech/abra/pkg/autocomplete"
|
||||||
"coopcloud.tech/abra/pkg/formatter"
|
"coopcloud.tech/abra/pkg/formatter"
|
||||||
@ -10,12 +12,16 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// translators: `abra recipe lint` aliases. use a comma separated list of
|
||||||
|
// aliases with no spaces in between
|
||||||
|
var recipeLintAliases = i18n.G("l")
|
||||||
|
|
||||||
var RecipeLintCommand = &cobra.Command{
|
var RecipeLintCommand = &cobra.Command{
|
||||||
// translators: `recipe lint` command
|
// translators: `recipe lint` command
|
||||||
Use: i18n.G("lint <recipe> [flags]"),
|
Use: i18n.G("lint <recipe> [flags]"),
|
||||||
// translators: Short description for `recipe lint` command
|
// translators: Short description for `recipe lint` command
|
||||||
Short: i18n.G("Lint a recipe"),
|
Short: i18n.G("Lint a recipe"),
|
||||||
Aliases: []string{i18n.G("l")},
|
Aliases: strings.Split(recipeLintAliases, ","),
|
||||||
Args: cobra.MinimumNArgs(1),
|
Args: cobra.MinimumNArgs(1),
|
||||||
ValidArgsFunction: func(
|
ValidArgsFunction: func(
|
||||||
cmd *cobra.Command,
|
cmd *cobra.Command,
|
||||||
|
@ -14,12 +14,16 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// translators: `abra recipe list` aliases. use a comma separated list of
|
||||||
|
// aliases with no spaces in between
|
||||||
|
var recipeListAliases = i18n.G("ls")
|
||||||
|
|
||||||
var RecipeListCommand = &cobra.Command{
|
var RecipeListCommand = &cobra.Command{
|
||||||
// translators: `recipe list` command
|
// translators: `recipe list` command
|
||||||
Use: i18n.G("list"),
|
Use: i18n.G("list"),
|
||||||
// translators: Short description for `recipe list` command
|
// translators: Short description for `recipe list` command
|
||||||
Short: i18n.G("List recipes"),
|
Short: i18n.G("List recipes"),
|
||||||
Aliases: []string{i18n.G("ls")},
|
Aliases: strings.Split(recipeListAliases, ","),
|
||||||
Args: cobra.NoArgs,
|
Args: cobra.NoArgs,
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
catl, err := recipe.ReadRecipeCatalogue(internal.Offline)
|
catl, err := recipe.ReadRecipeCatalogue(internal.Offline)
|
||||||
|
@ -5,6 +5,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
|
"strings"
|
||||||
"text/template"
|
"text/template"
|
||||||
|
|
||||||
"coopcloud.tech/abra/pkg/autocomplete"
|
"coopcloud.tech/abra/pkg/autocomplete"
|
||||||
@ -30,10 +31,15 @@ type recipeMetadata struct {
|
|||||||
SSO string
|
SSO string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// translators: `abra recipe new` aliases. use a comma separated list of
|
||||||
|
// aliases with no spaces in between
|
||||||
|
var recipeNewAliases = i18n.G("n")
|
||||||
|
|
||||||
var RecipeNewCommand = &cobra.Command{
|
var RecipeNewCommand = &cobra.Command{
|
||||||
// translators: `recipe new` command
|
// translators: `recipe new` command
|
||||||
Use: i18n.G("new <recipe> [flags]"),
|
Use: i18n.G("new <recipe> [flags]"),
|
||||||
Aliases: []string{i18n.G("n")},
|
Aliases: strings.Split(recipeNewAliases, ","),
|
||||||
|
// translators: Short description for `abra recipe new` command
|
||||||
Short: i18n.G("Create a new recipe"),
|
Short: i18n.G("Create a new recipe"),
|
||||||
Long: i18n.G(`A community managed recipe template is used.`),
|
Long: i18n.G(`A community managed recipe template is used.`),
|
||||||
Args: cobra.ExactArgs(1),
|
Args: cobra.ExactArgs(1),
|
||||||
|
@ -1,15 +1,21 @@
|
|||||||
package recipe
|
package recipe
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"strings"
|
||||||
|
|
||||||
"coopcloud.tech/abra/pkg/i18n"
|
"coopcloud.tech/abra/pkg/i18n"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// translators: `abra recipe` aliases. use a comma separated list of aliases
|
||||||
|
// with no spaces in between
|
||||||
|
var recipeAliases = i18n.G("r")
|
||||||
|
|
||||||
// RecipeCommand defines all recipe related sub-commands.
|
// RecipeCommand defines all recipe related sub-commands.
|
||||||
var RecipeCommand = &cobra.Command{
|
var RecipeCommand = &cobra.Command{
|
||||||
// translators: `recipe` command group
|
// translators: `recipe` command group
|
||||||
Use: i18n.G("recipe [cmd] [args] [flags]"),
|
Use: i18n.G("recipe [cmd] [args] [flags]"),
|
||||||
Aliases: []string{i18n.G("r")},
|
Aliases: strings.Split(recipeAliases, ","),
|
||||||
// translators: Short description for `recipe` command group
|
// translators: Short description for `recipe` command group
|
||||||
Short: i18n.G("Manage recipes"),
|
Short: i18n.G("Manage recipes"),
|
||||||
Long: i18n.G(`A recipe is a blueprint for an app.
|
Long: i18n.G(`A recipe is a blueprint for an app.
|
||||||
|
@ -23,10 +23,14 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// translators: `abra recipe release` aliases. use a comma separated list of
|
||||||
|
// aliases with no spaces in between
|
||||||
|
var recipeReleaseAliases = i18n.G("rl")
|
||||||
|
|
||||||
var RecipeReleaseCommand = &cobra.Command{
|
var RecipeReleaseCommand = &cobra.Command{
|
||||||
// translators: `recipe release` command
|
// translators: `recipe release` command
|
||||||
Use: i18n.G("release <recipe> [version] [flags]"),
|
Use: i18n.G("release <recipe> [version] [flags]"),
|
||||||
Aliases: []string{i18n.G("rl")},
|
Aliases: strings.Split(recipeReleaseAliases, ","),
|
||||||
// translators: Short description for `recipe release` command
|
// translators: Short description for `recipe release` command
|
||||||
Short: i18n.G("Release a new recipe version"),
|
Short: i18n.G("Release a new recipe version"),
|
||||||
Long: i18n.G(`Create a new version of a recipe.
|
Long: i18n.G(`Create a new version of a recipe.
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package recipe
|
package recipe
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"strings"
|
||||||
|
|
||||||
"coopcloud.tech/abra/cli/internal"
|
"coopcloud.tech/abra/cli/internal"
|
||||||
"coopcloud.tech/abra/pkg/autocomplete"
|
"coopcloud.tech/abra/pkg/autocomplete"
|
||||||
"coopcloud.tech/abra/pkg/i18n"
|
"coopcloud.tech/abra/pkg/i18n"
|
||||||
@ -9,10 +11,14 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// translators: `abra recipe reset` aliases. use a comma separated list of
|
||||||
|
// aliases with no spaces in between
|
||||||
|
var recipeResetAliases = i18n.G("rs")
|
||||||
|
|
||||||
var RecipeResetCommand = &cobra.Command{
|
var RecipeResetCommand = &cobra.Command{
|
||||||
// translators: `recipe reset` command
|
// translators: `recipe reset` command
|
||||||
Use: i18n.G("reset <recipe> [flags]"),
|
Use: i18n.G("reset <recipe> [flags]"),
|
||||||
Aliases: []string{i18n.G("rs")},
|
Aliases: strings.Split(recipeResetAliases, ","),
|
||||||
// translators: Short description for `recipe reset` command
|
// translators: Short description for `recipe reset` command
|
||||||
Short: i18n.G("Remove all unstaged changes from recipe config"),
|
Short: i18n.G("Remove all unstaged changes from recipe config"),
|
||||||
Long: i18n.G("WARNING: this will delete your changes. Be Careful."),
|
Long: i18n.G("WARNING: this will delete your changes. Be Careful."),
|
||||||
|
@ -3,6 +3,7 @@ package recipe
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"coopcloud.tech/abra/cli/internal"
|
"coopcloud.tech/abra/cli/internal"
|
||||||
"coopcloud.tech/abra/pkg/autocomplete"
|
"coopcloud.tech/abra/pkg/autocomplete"
|
||||||
@ -18,10 +19,14 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// translators: `abra recipe reset` aliases. use a comma separated list of
|
||||||
|
// aliases with no spaces in between
|
||||||
|
var recipeSyncAliases = i18n.G("s")
|
||||||
|
|
||||||
var RecipeSyncCommand = &cobra.Command{
|
var RecipeSyncCommand = &cobra.Command{
|
||||||
// translators: `recipe sync` command
|
// translators: `recipe sync` command
|
||||||
Use: i18n.G("sync <recipe> [version] [flags]"),
|
Use: i18n.G("sync <recipe> [version] [flags]"),
|
||||||
Aliases: []string{i18n.G("s")},
|
Aliases: strings.Split(recipeSyncAliases, ","),
|
||||||
// translators: Short description for `recipe sync` command
|
// translators: Short description for `recipe sync` command
|
||||||
Short: i18n.G("Sync recipe version label"),
|
Short: i18n.G("Sync recipe version label"),
|
||||||
Long: i18n.G(`Generate labels for the main recipe service.
|
Long: i18n.G(`Generate labels for the main recipe service.
|
||||||
|
@ -37,10 +37,14 @@ type anUpgrade struct {
|
|||||||
UpgradeTags []string `json:"upgrades"`
|
UpgradeTags []string `json:"upgrades"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// translators: `abra recipe upgrade` aliases. use a comma separated list of
|
||||||
|
// aliases with no spaces in between
|
||||||
|
var recipeUpgradeAliases = i18n.G("u")
|
||||||
|
|
||||||
var RecipeUpgradeCommand = &cobra.Command{
|
var RecipeUpgradeCommand = &cobra.Command{
|
||||||
// translators: `recipe upgrade` command
|
// translators: `recipe upgrade` command
|
||||||
Use: i18n.G("upgrade <recipe> [flags]"),
|
Use: i18n.G("upgrade <recipe> [flags]"),
|
||||||
Aliases: []string{i18n.G("u")},
|
Aliases: strings.Split(recipeUpgradeAliases, ","),
|
||||||
// translators: Short description for `recipe upgrade` command
|
// translators: Short description for `recipe upgrade` command
|
||||||
Short: i18n.G("Upgrade recipe image tags"),
|
Short: i18n.G("Upgrade recipe image tags"),
|
||||||
Long: i18n.G(`Upgrade a given <recipe> configuration.
|
Long: i18n.G(`Upgrade a given <recipe> configuration.
|
||||||
|
@ -3,6 +3,7 @@ package recipe
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"sort"
|
"sort"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"coopcloud.tech/abra/cli/internal"
|
"coopcloud.tech/abra/cli/internal"
|
||||||
"coopcloud.tech/abra/pkg/autocomplete"
|
"coopcloud.tech/abra/pkg/autocomplete"
|
||||||
@ -13,10 +14,14 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// translators: `abra recipe versions` aliases. use a comma separated list of aliases
|
||||||
|
// with no spaces in between
|
||||||
|
var recipeVersionsAliases = i18n.G("v")
|
||||||
|
|
||||||
var RecipeVersionCommand = &cobra.Command{
|
var RecipeVersionCommand = &cobra.Command{
|
||||||
// translators: `recipe versions` command
|
// translators: `recipe versions` command
|
||||||
Use: i18n.G("versions <recipe> [flags]"),
|
Use: i18n.G("versions <recipe> [flags]"),
|
||||||
Aliases: []string{i18n.G("v")},
|
Aliases: strings.Split(recipeVersionsAliases, ","),
|
||||||
// translators: Short description for `recipe versions` command
|
// translators: Short description for `recipe versions` command
|
||||||
Short: i18n.G("List recipe versions"),
|
Short: i18n.G("List recipe versions"),
|
||||||
Args: cobra.ExactArgs(1),
|
Args: cobra.ExactArgs(1),
|
||||||
|
@ -4,6 +4,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"coopcloud.tech/abra/cli/app"
|
"coopcloud.tech/abra/cli/app"
|
||||||
"coopcloud.tech/abra/cli/catalogue"
|
"coopcloud.tech/abra/cli/catalogue"
|
||||||
@ -108,10 +109,14 @@ func Run(version, commit string) {
|
|||||||
rootCmd.CompletionOptions.DisableDefaultCmd = true
|
rootCmd.CompletionOptions.DisableDefaultCmd = true
|
||||||
rootCmd.SetUsageTemplate(usageTemplate)
|
rootCmd.SetUsageTemplate(usageTemplate)
|
||||||
|
|
||||||
|
// translators: `abra man` aliases. use a comma separated list of aliases
|
||||||
|
// with no spaces in between
|
||||||
|
manAliases := i18n.G("m")
|
||||||
|
|
||||||
manCommand := &cobra.Command{
|
manCommand := &cobra.Command{
|
||||||
// translators: `man` command
|
// translators: `man` command
|
||||||
Use: i18n.G("man [flags]"),
|
Use: i18n.G("man [flags]"),
|
||||||
Aliases: []string{"m"},
|
Aliases: strings.Split(manAliases, ","),
|
||||||
// translators: Short description for `man` command
|
// translators: Short description for `man` command
|
||||||
Short: i18n.G("Generate manpage"),
|
Short: i18n.G("Generate manpage"),
|
||||||
Example: i18n.G(` # generate the man pages into /usr/local/share/man/man1
|
Example: i18n.G(` # generate the man pages into /usr/local/share/man/man1
|
||||||
|
@ -3,6 +3,7 @@ package server
|
|||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"coopcloud.tech/abra/cli/internal"
|
"coopcloud.tech/abra/cli/internal"
|
||||||
"coopcloud.tech/abra/pkg/autocomplete"
|
"coopcloud.tech/abra/pkg/autocomplete"
|
||||||
@ -17,10 +18,14 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// translators: `abra server add` aliases. use a comma separated list of
|
||||||
|
// aliases with no spaces in between
|
||||||
|
var serverAddAliases = i18n.G("a")
|
||||||
|
|
||||||
var ServerAddCommand = &cobra.Command{
|
var ServerAddCommand = &cobra.Command{
|
||||||
// translators: `server add` command
|
// translators: `server add` command
|
||||||
Use: i18n.G("add [[server] | --local] [flags]"),
|
Use: i18n.G("add [[server] | --local] [flags]"),
|
||||||
Aliases: []string{i18n.G("a")},
|
Aliases: strings.Split(serverAddAliases, ","),
|
||||||
// translators: Short description for `server add` command
|
// translators: Short description for `server add` command
|
||||||
Short: i18n.G("Add a new server"),
|
Short: i18n.G("Add a new server"),
|
||||||
Long: i18n.G(`Add a new server to your configuration so that it can be managed by Abra.
|
Long: i18n.G(`Add a new server to your configuration so that it can be managed by Abra.
|
||||||
|
@ -14,10 +14,14 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// translators: `abra server list` aliases. use a comma separated list of
|
||||||
|
// aliases with no spaces in between
|
||||||
|
var serverListAliases = i18n.G("ls")
|
||||||
|
|
||||||
var ServerListCommand = &cobra.Command{
|
var ServerListCommand = &cobra.Command{
|
||||||
// translators: `server list` command
|
// translators: `server list` command
|
||||||
Use: i18n.G("list [flags]"),
|
Use: i18n.G("list [flags]"),
|
||||||
Aliases: []string{i18n.G("ls")},
|
Aliases: strings.Split(serverListAliases, ","),
|
||||||
// translators: Short description for `server list` command
|
// translators: Short description for `server list` command
|
||||||
Short: i18n.G("List managed servers"),
|
Short: i18n.G("List managed servers"),
|
||||||
Args: cobra.NoArgs,
|
Args: cobra.NoArgs,
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package server
|
package server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"strings"
|
||||||
|
|
||||||
"coopcloud.tech/abra/cli/internal"
|
"coopcloud.tech/abra/cli/internal"
|
||||||
"coopcloud.tech/abra/pkg/autocomplete"
|
"coopcloud.tech/abra/pkg/autocomplete"
|
||||||
"coopcloud.tech/abra/pkg/client"
|
"coopcloud.tech/abra/pkg/client"
|
||||||
@ -11,10 +13,14 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// translators: `abra server prune` aliases. use a comma separated list of
|
||||||
|
// aliases with no spaces in between
|
||||||
|
var serverPruneliases = i18n.G("p")
|
||||||
|
|
||||||
var ServerPruneCommand = &cobra.Command{
|
var ServerPruneCommand = &cobra.Command{
|
||||||
// translators: `server prune` command
|
// translators: `server prune` command
|
||||||
Use: i18n.G("prune <server> [flags]"),
|
Use: i18n.G("prune <server> [flags]"),
|
||||||
Aliases: []string{i18n.G("p")},
|
Aliases: strings.Split(serverPruneliases, ","),
|
||||||
// translators: Short description for `server prune` command
|
// translators: Short description for `server prune` command
|
||||||
Short: i18n.G("Prune resources on a server"),
|
Short: i18n.G("Prune resources on a server"),
|
||||||
Long: i18n.G(`Prunes unused containers, networks, and dangling images.
|
Long: i18n.G(`Prunes unused containers, networks, and dangling images.
|
||||||
|
@ -3,6 +3,7 @@ package server
|
|||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"coopcloud.tech/abra/cli/internal"
|
"coopcloud.tech/abra/cli/internal"
|
||||||
"coopcloud.tech/abra/pkg/autocomplete"
|
"coopcloud.tech/abra/pkg/autocomplete"
|
||||||
@ -13,10 +14,14 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// translators: `abra server remove` aliases. use a comma separated list of
|
||||||
|
// aliases with no spaces in between
|
||||||
|
var serverRemoveAliases = i18n.G("rm")
|
||||||
|
|
||||||
var ServerRemoveCommand = &cobra.Command{
|
var ServerRemoveCommand = &cobra.Command{
|
||||||
// translators: `server remove` command
|
// translators: `server remove` command
|
||||||
Use: i18n.G("remove <server> [flags]"),
|
Use: i18n.G("remove <server> [flags]"),
|
||||||
Aliases: []string{i18n.G("rm")},
|
Aliases: strings.Split(serverRemoveAliases, ","),
|
||||||
// translators: Short description for `server remove` command
|
// translators: Short description for `server remove` command
|
||||||
Short: i18n.G("Remove a managed server"),
|
Short: i18n.G("Remove a managed server"),
|
||||||
Long: i18n.G(`Remove a managed server.
|
Long: i18n.G(`Remove a managed server.
|
||||||
|
@ -1,15 +1,21 @@
|
|||||||
package server
|
package server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"strings"
|
||||||
|
|
||||||
"coopcloud.tech/abra/pkg/i18n"
|
"coopcloud.tech/abra/pkg/i18n"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// translators: `abra server` aliases. use a comma separated list of aliases
|
||||||
|
// with no spaces in between
|
||||||
|
var serverAliases = i18n.G("s")
|
||||||
|
|
||||||
// ServerCommand defines the `abra server` command and its subcommands
|
// ServerCommand defines the `abra server` command and its subcommands
|
||||||
var ServerCommand = &cobra.Command{
|
var ServerCommand = &cobra.Command{
|
||||||
// translators: `server` command group
|
// translators: `server` command group
|
||||||
Use: i18n.G("server [cmd] [args] [flags]"),
|
Use: i18n.G("server [cmd] [args] [flags]"),
|
||||||
Aliases: []string{i18n.G("s")},
|
Aliases: strings.Split(serverAliases, ","),
|
||||||
// translators: Short description for `server` command group
|
// translators: Short description for `server` command group
|
||||||
Short: i18n.G("Manage servers"),
|
Short: i18n.G("Manage servers"),
|
||||||
}
|
}
|
||||||
|
@ -30,11 +30,15 @@ import (
|
|||||||
|
|
||||||
const SERVER = "localhost"
|
const SERVER = "localhost"
|
||||||
|
|
||||||
|
// translators: `kadabra notify` aliases. use a comma separated list of aliases
|
||||||
|
// with no spaces in between
|
||||||
|
var notifyAliases = i18n.G("n")
|
||||||
|
|
||||||
// NotifyCommand checks for available upgrades.
|
// NotifyCommand checks for available upgrades.
|
||||||
var NotifyCommand = &cobra.Command{
|
var NotifyCommand = &cobra.Command{
|
||||||
// translators: `notify` command
|
// translators: `notify` command
|
||||||
Use: i18n.G("notify [flags]"),
|
Use: i18n.G("notify [flags]"),
|
||||||
Aliases: []string{i18n.G("n")},
|
Aliases: strings.Split(notifyAliases, ","),
|
||||||
// translators: Short description for `notify` command
|
// translators: Short description for `notify` command
|
||||||
Short: i18n.G("Check for available upgrades"),
|
Short: i18n.G("Check for available upgrades"),
|
||||||
Long: i18n.G(`Notify on new versions for deployed apps.
|
Long: i18n.G(`Notify on new versions for deployed apps.
|
||||||
@ -71,11 +75,15 @@ Use "--major/-m" to include new major versions.`),
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// translators: `kadabra upgrade` aliases. use a comma separated list of aliases with
|
||||||
|
// no spaces in between
|
||||||
|
var upgradeAliases = i18n.G("u")
|
||||||
|
|
||||||
// UpgradeCommand upgrades apps.
|
// UpgradeCommand upgrades apps.
|
||||||
var UpgradeCommand = &cobra.Command{
|
var UpgradeCommand = &cobra.Command{
|
||||||
// translators: `app upgrade` command
|
// translators: `app upgrade` command
|
||||||
Use: i18n.G("upgrade [[stack] [recipe] | --all] [flags]"),
|
Use: i18n.G("upgrade [[stack] [recipe] | --all] [flags]"),
|
||||||
Aliases: []string{i18n.G("u")},
|
Aliases: strings.Split(upgradeAliases, ","),
|
||||||
// translators: Short description for `app upgrade` command
|
// translators: Short description for `app upgrade` command
|
||||||
Short: i18n.G("Upgrade apps"),
|
Short: i18n.G("Upgrade apps"),
|
||||||
Long: i18n.G(`Upgrade an app by specifying stack name and recipe.
|
Long: i18n.G(`Upgrade an app by specifying stack name and recipe.
|
||||||
|
@ -4,6 +4,7 @@ package cli
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"coopcloud.tech/abra/cli/internal"
|
"coopcloud.tech/abra/cli/internal"
|
||||||
"coopcloud.tech/abra/pkg/i18n"
|
"coopcloud.tech/abra/pkg/i18n"
|
||||||
@ -11,11 +12,15 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// translators: `abra upgrade` aliases. use a comma separated list of aliases with
|
||||||
|
// no spaces in between
|
||||||
|
var upgradeAliases = i18n.G("u")
|
||||||
|
|
||||||
// UpgradeCommand upgrades abra in-place.
|
// UpgradeCommand upgrades abra in-place.
|
||||||
var UpgradeCommand = &cobra.Command{
|
var UpgradeCommand = &cobra.Command{
|
||||||
// translators: `upgrade` command
|
// translators: `upgrade` command
|
||||||
Use: i18n.G("upgrade [flags]"),
|
Use: i18n.G("upgrade [flags]"),
|
||||||
Aliases: []string{"u"},
|
Aliases: strings.Split(upgradeAliases, ","),
|
||||||
// translators: Short description for `upgrade` command
|
// translators: Short description for `upgrade` command
|
||||||
Short: i18n.G("Upgrade abra"),
|
Short: i18n.G("Upgrade abra"),
|
||||||
Long: i18n.G(`Upgrade abra in-place with the latest stable or release candidate.
|
Long: i18n.G(`Upgrade abra in-place with the latest stable or release candidate.
|
||||||
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user