123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- package main
- import (
- "github.com/spf13/cobra"
- )
- var (
- bundleCreateCommand = &cobra.Command{
- Use: "create",
- Short: "Create a bundle",
- Long: "Create a bundle",
- Run: func(c *cobra.Command, args []string) {
- },
- }
- bundleAnalyzeCommand = &cobra.Command{
- Use: "analyze",
- Short: "List all dependencies",
- Long: "List all dependencies",
- Run: func(c *cobra.Command, args []string) {
- },
- }
- bundleAppendDependencyCommand = &cobra.Command{
- Use: "append",
- Short: "Append a dependency",
- Long: "Append a dependency",
- }
- bundleAppendGithubDependencyCommand = &cobra.Command{
- Use: "github",
- Short: "Append a github dependency",
- Long: "Append a github dependency",
- Run: func(c *cobra.Command, args []string) {
- },
- }
- bundleAppendMarketplaceDependencyCommand = &cobra.Command{
- Use: "marketplace",
- Short: "Append a marketplace dependency",
- Long: "Append a marketplace dependency",
- Run: func(c *cobra.Command, args []string) {
- },
- }
- bundleAppendPackageDependencyCommand = &cobra.Command{
- Use: "package",
- Short: "Append a local package dependency",
- Long: "Append a local package dependency",
- Run: func(c *cobra.Command, args []string) {
- },
- }
- bundleRegenerateCommand = &cobra.Command{
- Use: "regenerate",
- Short: "Regenerate the bundle",
- Long: "Regenerate the bundle",
- Run: func(c *cobra.Command, args []string) {
- },
- }
- bundleRemoveDependencyCommand = &cobra.Command{
- Use: "remove",
- Short: "Remove a dependency",
- Long: "Remove a dependency",
- Run: func(c *cobra.Command, args []string) {
- },
- }
- bundleBumpVersionCommand = &cobra.Command{
- Use: "bump",
- Short: "Bump the version of the bundle",
- Long: "Bump the version of the bundle",
- Run: func(c *cobra.Command, args []string) {
- },
- }
- bundleListDependenciesCommand = &cobra.Command{
- Use: "list",
- Short: "List all dependencies",
- Long: "List all dependencies",
- Run: func(c *cobra.Command, args []string) {
- },
- }
- )
- func init() {
- bundleCommand.AddCommand(bundleCreateCommand)
- bundleCommand.AddCommand(bundleAppendDependencyCommand)
- bundleAppendDependencyCommand.AddCommand(bundleAppendGithubDependencyCommand)
- bundleAppendDependencyCommand.AddCommand(bundleAppendMarketplaceDependencyCommand)
- bundleAppendDependencyCommand.AddCommand(bundleAppendPackageDependencyCommand)
- bundleCommand.AddCommand(bundleRemoveDependencyCommand)
- bundleCommand.AddCommand(bundleRegenerateCommand)
- bundleCommand.AddCommand(bundleBumpVersionCommand)
- bundleCommand.AddCommand(bundleListDependenciesCommand)
- bundleCommand.AddCommand(bundleAnalyzeCommand)
- bundleAppendDependencyCommand.Flags().StringP("bundle_path", "i", "", "path to the bundle file")
- bundleAppendDependencyCommand.MarkFlagRequired("bundle_path")
- bundleAppendGithubDependencyCommand.Flags().StringP("repo_pattern", "r", "", "github repo pattern")
- bundleAppendGithubDependencyCommand.MarkFlagRequired("repo_pattern")
- bundleAppendMarketplaceDependencyCommand.Flags().StringP("marketplace_pattern", "m", "", "marketplace pattern")
- bundleAppendMarketplaceDependencyCommand.MarkFlagRequired("marketplace_pattern")
- bundleAppendPackageDependencyCommand.Flags().StringP("package_path", "p", "", "path to the package")
- bundleAppendPackageDependencyCommand.MarkFlagRequired("package_path")
- }
|