Skip to content

Commit

Permalink
added fury
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Jul 29, 2022
1 parent 284364d commit ea24ae7
Show file tree
Hide file tree
Showing 23 changed files with 396 additions and 0 deletions.
17 changes: 17 additions & 0 deletions completers/fury_completer/cmd/accounts.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package cmd

import (
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
)

var accountsCmd = &cobra.Command{
Use: "accounts",
Short: "Listing of your collaborations",
Run: func(cmd *cobra.Command, args []string) {},
}

func init() {
carapace.Gen(accountsCmd).Standalone()
rootCmd.AddCommand(accountsCmd)
}
17 changes: 17 additions & 0 deletions completers/fury_completer/cmd/git.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package cmd

import (
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
)

var gitCmd = &cobra.Command{
Use: "git",
Short: "Git repository commands",
Run: func(cmd *cobra.Command, args []string) {},
}

func init() {
carapace.Gen(gitCmd).Standalone()
rootCmd.AddCommand(gitCmd)
}
17 changes: 17 additions & 0 deletions completers/fury_completer/cmd/git_config.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package cmd

import (
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
)

var git_configCmd = &cobra.Command{
Use: "config",
Short: "Configure Git build",
Run: func(cmd *cobra.Command, args []string) {},
}

func init() {
carapace.Gen(git_configCmd).Standalone()
gitCmd.AddCommand(git_configCmd)
}
17 changes: 17 additions & 0 deletions completers/fury_completer/cmd/git_config_get.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package cmd

import (
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
)

var git_config_getCmd = &cobra.Command{
Use: "get",
Short: "Get Git build environment key",
Run: func(cmd *cobra.Command, args []string) {},
}

func init() {
carapace.Gen(git_config_getCmd).Standalone()
git_configCmd.AddCommand(git_config_getCmd)
}
17 changes: 17 additions & 0 deletions completers/fury_completer/cmd/git_config_set.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package cmd

import (
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
)

var git_config_setCmd = &cobra.Command{
Use: "set",
Short: "Set Git build environment key",
Run: func(cmd *cobra.Command, args []string) {},
}

func init() {
carapace.Gen(git_config_setCmd).Standalone()
git_configCmd.AddCommand(git_config_setCmd)
}
17 changes: 17 additions & 0 deletions completers/fury_completer/cmd/git_config_unset.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package cmd

import (
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
)

var git_config_unsetCmd = &cobra.Command{
Use: "unset",
Short: "Remove Git build environment key",
Run: func(cmd *cobra.Command, args []string) {},
}

func init() {
carapace.Gen(git_config_unsetCmd).Standalone()
git_configCmd.AddCommand(git_config_unsetCmd)
}
19 changes: 19 additions & 0 deletions completers/fury_completer/cmd/git_destroy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package cmd

import (
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
)

var git_destroyCmd = &cobra.Command{
Use: "destroy",
Short: "Remove Git repository",
Aliases: []string{"reset"},
Run: func(cmd *cobra.Command, args []string) {},
}

func init() {
carapace.Gen(git_destroyCmd).Standalone()
git_destroyCmd.Flags().Bool("reset-only", false, "Reset repo without destroying")
gitCmd.AddCommand(git_destroyCmd)
}
17 changes: 17 additions & 0 deletions completers/fury_completer/cmd/git_list.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package cmd

import (
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
)

var git_listCmd = &cobra.Command{
Use: "list",
Short: "List repos in this account",
Run: func(cmd *cobra.Command, args []string) {},
}

func init() {
carapace.Gen(git_listCmd).Standalone()
gitCmd.AddCommand(git_listCmd)
}
18 changes: 18 additions & 0 deletions completers/fury_completer/cmd/git_rebuild.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package cmd

import (
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
)

var git_rebuildCmd = &cobra.Command{
Use: "rebuild",
Short: "Run the builder on the repo",
Run: func(cmd *cobra.Command, args []string) {},
}

func init() {
carapace.Gen(git_rebuildCmd).Standalone()
git_rebuildCmd.Flags().StringP("revision", "r", "", "Revision")
gitCmd.AddCommand(git_rebuildCmd)
}
17 changes: 17 additions & 0 deletions completers/fury_completer/cmd/git_rename.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package cmd

import (
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
)

var git_renameCmd = &cobra.Command{
Use: "rename",
Short: "Rename a Git repository",
Run: func(cmd *cobra.Command, args []string) {},
}

func init() {
carapace.Gen(git_renameCmd).Standalone()
gitCmd.AddCommand(git_renameCmd)
}
17 changes: 17 additions & 0 deletions completers/fury_completer/cmd/help.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package cmd

import (
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
)

var helpCmd = &cobra.Command{
Use: "help",
Short: "Help about any command",
Run: func(cmd *cobra.Command, args []string) {},
}

func init() {
carapace.Gen(helpCmd).Standalone()
rootCmd.AddCommand(helpCmd)
}
17 changes: 17 additions & 0 deletions completers/fury_completer/cmd/login.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package cmd

import (
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
)

var loginCmd = &cobra.Command{
Use: "login",
Short: "Authenticate into Gemfury account",
Run: func(cmd *cobra.Command, args []string) {},
}

func init() {
carapace.Gen(loginCmd).Standalone()
rootCmd.AddCommand(loginCmd)
}
17 changes: 17 additions & 0 deletions completers/fury_completer/cmd/logout.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package cmd

import (
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
)

var logoutCmd = &cobra.Command{
Use: "logout",
Short: "Clear CLI session credentials",
Run: func(cmd *cobra.Command, args []string) {},
}

func init() {
carapace.Gen(logoutCmd).Standalone()
rootCmd.AddCommand(logoutCmd)
}
18 changes: 18 additions & 0 deletions completers/fury_completer/cmd/packages.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package cmd

import (
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
)

var packagesCmd = &cobra.Command{
Use: "packages",
Short: "List packages in this account",
Aliases: []string{"list"},
Run: func(cmd *cobra.Command, args []string) {},
}

func init() {
carapace.Gen(packagesCmd).Standalone()
rootCmd.AddCommand(packagesCmd)
}
19 changes: 19 additions & 0 deletions completers/fury_completer/cmd/push.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package cmd

import (
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
)

var pushCmd = &cobra.Command{
Use: "push",
Short: "Upload a new version of a package",
Run: func(cmd *cobra.Command, args []string) {},
}

func init() {
carapace.Gen(pushCmd).Standalone()
pushCmd.Flags().Bool("public", false, "Create as public package")
pushCmd.Flags().Bool("quiet", false, "Do not show progress bar")
rootCmd.AddCommand(pushCmd)
}
24 changes: 24 additions & 0 deletions completers/fury_completer/cmd/root.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package cmd

import (
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
)

var rootCmd = &cobra.Command{
Use: "fury",
Short: "Command line interface to Gemfury API",
Run: func(cmd *cobra.Command, args []string) {},
}

func Execute() error {
return rootCmd.Execute()
}

func init() {
carapace.Gen(rootCmd).Standalone()
rootCmd.PersistentFlags().StringP("account", "a", "", "Current account username")
rootCmd.PersistentFlags().String("api-token", "", "Inline authentication token")
rootCmd.Flags().BoolP("help", "h", false, "help for fury")
rootCmd.Flags().BoolP("version", "v", false, "version for fury")
}
17 changes: 17 additions & 0 deletions completers/fury_completer/cmd/sharing.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package cmd

import (
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
)

var sharingCmd = &cobra.Command{
Use: "sharing",
Short: "Collaboration commands",
Run: func(cmd *cobra.Command, args []string) {},
}

func init() {
carapace.Gen(sharingCmd).Standalone()
rootCmd.AddCommand(sharingCmd)
}
18 changes: 18 additions & 0 deletions completers/fury_completer/cmd/sharing_add.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package cmd

import (
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
)

var sharing_addCmd = &cobra.Command{
Use: "add",
Short: "Add a collaborator",
Run: func(cmd *cobra.Command, args []string) {},
}

func init() {
carapace.Gen(sharing_addCmd).Standalone()
sharing_addCmd.Flags().String("role", "", "Collaborator role")
sharingCmd.AddCommand(sharing_addCmd)
}
17 changes: 17 additions & 0 deletions completers/fury_completer/cmd/sharing_remove.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package cmd

import (
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
)

var sharing_removeCmd = &cobra.Command{
Use: "remove",
Short: "Remove a collaborator",
Run: func(cmd *cobra.Command, args []string) {},
}

func init() {
carapace.Gen(sharing_removeCmd).Standalone()
sharingCmd.AddCommand(sharing_removeCmd)
}
17 changes: 17 additions & 0 deletions completers/fury_completer/cmd/versions.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package cmd

import (
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
)

var versionsCmd = &cobra.Command{
Use: "versions",
Short: "List versions for a package",
Run: func(cmd *cobra.Command, args []string) {},
}

func init() {
carapace.Gen(versionsCmd).Standalone()
rootCmd.AddCommand(versionsCmd)
}
17 changes: 17 additions & 0 deletions completers/fury_completer/cmd/whoami.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package cmd

import (
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
)

var whoamiCmd = &cobra.Command{
Use: "whoami",
Short: "Show current account",
Run: func(cmd *cobra.Command, args []string) {},
}

func init() {
carapace.Gen(whoamiCmd).Standalone()
rootCmd.AddCommand(whoamiCmd)
}
Loading

0 comments on commit ea24ae7

Please sign in to comment.