1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
package variable
import (
"github.com/spf13/cobra"
"gitlab.com/gitlab-org/cli/commands/cmdutils"
deleteCmd "gitlab.com/gitlab-org/cli/commands/variable/delete"
exportCmd "gitlab.com/gitlab-org/cli/commands/variable/export"
getCmd "gitlab.com/gitlab-org/cli/commands/variable/get"
listCmd "gitlab.com/gitlab-org/cli/commands/variable/list"
setCmd "gitlab.com/gitlab-org/cli/commands/variable/set"
updateCmd "gitlab.com/gitlab-org/cli/commands/variable/update"
)
func NewVariableCmd(f *cmdutils.Factory) *cobra.Command {
cmd := &cobra.Command{
Use: "variable",
Short: "Manage variables for a GitLab project or group.",
Aliases: []string{"var"},
}
cmdutils.EnableRepoOverride(cmd, f)
cmd.AddCommand(setCmd.NewCmdSet(f, nil))
cmd.AddCommand(listCmd.NewCmdList(f, nil))
cmd.AddCommand(deleteCmd.NewCmdDelete(f, nil))
cmd.AddCommand(updateCmd.NewCmdUpdate(f, nil))
cmd.AddCommand(getCmd.NewCmdGet(f, nil))
cmd.AddCommand(exportCmd.NewCmdExport(f, nil))
return cmd
}
|