forked from toolshed/abra
@ -1,6 +1,8 @@
|
||||
package recipe
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"coopcloud.tech/abra/cli/internal"
|
||||
"coopcloud.tech/abra/pkg/autocomplete"
|
||||
gitPkg "coopcloud.tech/abra/pkg/git"
|
||||
@ -9,10 +11,14 @@ import (
|
||||
"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{
|
||||
// translators: `recipe diff` command
|
||||
Use: i18n.G("diff <recipe> [flags]"),
|
||||
Aliases: []string{i18n.G("d")},
|
||||
Aliases: strings.Split(recipeDiffAliases, ","),
|
||||
// translators: Short description for `recipe diff` command
|
||||
Short: i18n.G("Show unstaged changes in recipe config"),
|
||||
Long: i18n.G("This command requires /usr/bin/git."),
|
||||
|
@ -2,6 +2,7 @@ package recipe
|
||||
|
||||
import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"coopcloud.tech/abra/cli/internal"
|
||||
"coopcloud.tech/abra/pkg/autocomplete"
|
||||
@ -14,10 +15,14 @@ import (
|
||||
"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{
|
||||
// translators: `recipe fetch` command
|
||||
Use: i18n.G("fetch [recipe | --all] [flags]"),
|
||||
Aliases: []string{i18n.G("f")},
|
||||
Aliases: strings.Split(recipeFetchAliases, ","),
|
||||
// translators: Short description for `recipe fetch` command
|
||||
Short: i18n.G("Clone recipe(s) locally"),
|
||||
Long: i18n.G(`Using "--force/-f" Git syncs an existing recipe. It does not erase unstaged changes.`),
|
||||
|
@ -1,6 +1,8 @@
|
||||
package recipe
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"coopcloud.tech/abra/cli/internal"
|
||||
"coopcloud.tech/abra/pkg/autocomplete"
|
||||
"coopcloud.tech/abra/pkg/formatter"
|
||||
@ -10,12 +12,16 @@ import (
|
||||
"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{
|
||||
// translators: `recipe lint` command
|
||||
Use: i18n.G("lint <recipe> [flags]"),
|
||||
// translators: Short description for `recipe lint` command
|
||||
Short: i18n.G("Lint a recipe"),
|
||||
Aliases: []string{i18n.G("l")},
|
||||
Aliases: strings.Split(recipeLintAliases, ","),
|
||||
Args: cobra.MinimumNArgs(1),
|
||||
ValidArgsFunction: func(
|
||||
cmd *cobra.Command,
|
||||
|
@ -14,12 +14,16 @@ import (
|
||||
"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{
|
||||
// translators: `recipe list` command
|
||||
Use: i18n.G("list"),
|
||||
// translators: Short description for `recipe list` command
|
||||
Short: i18n.G("List recipes"),
|
||||
Aliases: []string{i18n.G("ls")},
|
||||
Aliases: strings.Split(recipeListAliases, ","),
|
||||
Args: cobra.NoArgs,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
catl, err := recipe.ReadRecipeCatalogue(internal.Offline)
|
||||
|
@ -5,6 +5,7 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path"
|
||||
"strings"
|
||||
"text/template"
|
||||
|
||||
"coopcloud.tech/abra/pkg/autocomplete"
|
||||
@ -30,13 +31,18 @@ type recipeMetadata struct {
|
||||
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{
|
||||
// translators: `recipe new` command
|
||||
Use: i18n.G("new <recipe> [flags]"),
|
||||
Aliases: []string{i18n.G("n")},
|
||||
Short: i18n.G("Create a new recipe"),
|
||||
Long: i18n.G(`A community managed recipe template is used.`),
|
||||
Args: cobra.ExactArgs(1),
|
||||
Aliases: strings.Split(recipeNewAliases, ","),
|
||||
// translators: Short description for `abra recipe new` command
|
||||
Short: i18n.G("Create a new recipe"),
|
||||
Long: i18n.G(`A community managed recipe template is used.`),
|
||||
Args: cobra.ExactArgs(1),
|
||||
ValidArgsFunction: func(
|
||||
cmd *cobra.Command,
|
||||
args []string,
|
||||
|
@ -1,15 +1,21 @@
|
||||
package recipe
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"coopcloud.tech/abra/pkg/i18n"
|
||||
"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.
|
||||
var RecipeCommand = &cobra.Command{
|
||||
// translators: `recipe` command group
|
||||
Use: i18n.G("recipe [cmd] [args] [flags]"),
|
||||
Aliases: []string{i18n.G("r")},
|
||||
Aliases: strings.Split(recipeAliases, ","),
|
||||
// translators: Short description for `recipe` command group
|
||||
Short: i18n.G("Manage recipes"),
|
||||
Long: i18n.G(`A recipe is a blueprint for an app.
|
||||
|
@ -23,10 +23,14 @@ import (
|
||||
"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{
|
||||
// translators: `recipe release` command
|
||||
Use: i18n.G("release <recipe> [version] [flags]"),
|
||||
Aliases: []string{i18n.G("rl")},
|
||||
Aliases: strings.Split(recipeReleaseAliases, ","),
|
||||
// translators: Short description for `recipe release` command
|
||||
Short: i18n.G("Release a new recipe version"),
|
||||
Long: i18n.G(`Create a new version of a recipe.
|
||||
|
@ -1,6 +1,8 @@
|
||||
package recipe
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"coopcloud.tech/abra/cli/internal"
|
||||
"coopcloud.tech/abra/pkg/autocomplete"
|
||||
"coopcloud.tech/abra/pkg/i18n"
|
||||
@ -9,10 +11,14 @@ import (
|
||||
"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{
|
||||
// translators: `recipe reset` command
|
||||
Use: i18n.G("reset <recipe> [flags]"),
|
||||
Aliases: []string{i18n.G("rs")},
|
||||
Aliases: strings.Split(recipeResetAliases, ","),
|
||||
// translators: Short description for `recipe reset` command
|
||||
Short: i18n.G("Remove all unstaged changes from recipe config"),
|
||||
Long: i18n.G("WARNING: this will delete your changes. Be Careful."),
|
||||
|
@ -3,6 +3,7 @@ package recipe
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"coopcloud.tech/abra/cli/internal"
|
||||
"coopcloud.tech/abra/pkg/autocomplete"
|
||||
@ -18,10 +19,14 @@ import (
|
||||
"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{
|
||||
// translators: `recipe sync` command
|
||||
Use: i18n.G("sync <recipe> [version] [flags]"),
|
||||
Aliases: []string{i18n.G("s")},
|
||||
Aliases: strings.Split(recipeSyncAliases, ","),
|
||||
// translators: Short description for `recipe sync` command
|
||||
Short: i18n.G("Sync recipe version label"),
|
||||
Long: i18n.G(`Generate labels for the main recipe service.
|
||||
|
@ -37,10 +37,14 @@ type anUpgrade struct {
|
||||
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{
|
||||
// translators: `recipe upgrade` command
|
||||
Use: i18n.G("upgrade <recipe> [flags]"),
|
||||
Aliases: []string{i18n.G("u")},
|
||||
Aliases: strings.Split(recipeUpgradeAliases, ","),
|
||||
// translators: Short description for `recipe upgrade` command
|
||||
Short: i18n.G("Upgrade recipe image tags"),
|
||||
Long: i18n.G(`Upgrade a given <recipe> configuration.
|
||||
|
@ -3,6 +3,7 @@ package recipe
|
||||
import (
|
||||
"fmt"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"coopcloud.tech/abra/cli/internal"
|
||||
"coopcloud.tech/abra/pkg/autocomplete"
|
||||
@ -13,10 +14,14 @@ import (
|
||||
"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{
|
||||
// translators: `recipe versions` command
|
||||
Use: i18n.G("versions <recipe> [flags]"),
|
||||
Aliases: []string{i18n.G("v")},
|
||||
Aliases: strings.Split(recipeVersionsAliases, ","),
|
||||
// translators: Short description for `recipe versions` command
|
||||
Short: i18n.G("List recipe versions"),
|
||||
Args: cobra.ExactArgs(1),
|
||||
|
Reference in New Issue
Block a user