-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
211 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var bannerCmd = &cobra.Command{ | ||
Use: "banner", | ||
Short: "print installation banner", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(bannerCmd).Standalone() | ||
|
||
bannerCmd.Flags().BoolS("v", "v", false, "verbosity") | ||
|
||
rootCmd.AddCommand(bannerCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var bootstrapCmd = &cobra.Command{ | ||
Use: "bootstrap", | ||
Short: "rebuild everything", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(bootstrapCmd).Standalone() | ||
|
||
bootstrapCmd.Flags().BoolS("a", "a", false, "rebuild all") | ||
bootstrapCmd.Flags().BoolS("d", "d", false, "enable debugging of bootstrap process") | ||
bootstrapCmd.Flags().BoolS("no-banner", "no-banner", false, "do not print banner") | ||
bootstrapCmd.Flags().BoolS("no-clean", "no-clean", false, "print deprecation warning") | ||
bootstrapCmd.Flags().BoolS("v", "v", false, "verbosity") | ||
rootCmd.AddCommand(bootstrapCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var cleanCmd = &cobra.Command{ | ||
Use: "clean", | ||
Short: "deletes all built files", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(cleanCmd).Standalone() | ||
|
||
cleanCmd.Flags().BoolS("v", "v", false, "verbosity") | ||
|
||
rootCmd.AddCommand(cleanCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var envCmd = &cobra.Command{ | ||
Use: "env", | ||
Short: "print environment", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(envCmd).Standalone() | ||
|
||
envCmd.Flags().BoolS("9", "9", false, "emit plan 9 syntax") | ||
envCmd.Flags().BoolS("p", "p", false, "emit updated $PATH") | ||
envCmd.Flags().BoolS("v", "v", false, "verbosity") | ||
envCmd.Flags().BoolS("w", "w", false, "emit windows syntax") | ||
|
||
rootCmd.AddCommand(envCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var installCmd = &cobra.Command{ | ||
Use: "install", | ||
Short: "install individual directory", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(installCmd).Standalone() | ||
|
||
installCmd.Flags().BoolS("v", "v", false, "verbosity") | ||
rootCmd.AddCommand(installCmd) | ||
|
||
carapace.Gen(installCmd).PositionalCompletion( | ||
carapace.ActionDirectories(), | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var listCmd = &cobra.Command{ | ||
Use: "list", | ||
Short: "list all supported platforms", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(listCmd).Standalone() | ||
|
||
listCmd.Flags().BoolS("json", "json", false, "produce JSON output") | ||
listCmd.Flags().BoolS("v", "v", false, "verbosity") | ||
|
||
rootCmd.AddCommand(listCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var rootCmd = &cobra.Command{ | ||
Use: "go-tool-dist", | ||
Short: "Dist helps bootstrap, build, and test the Go distribution", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func Execute() error { | ||
return rootCmd.Execute() | ||
} | ||
func init() { | ||
carapace.Gen(rootCmd).Standalone() | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/rsteube/carapace-bin/pkg/actions/tools/golang" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var testCmd = &cobra.Command{ | ||
Use: "test", | ||
Short: "run Go test(s)", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(testCmd).Standalone() | ||
|
||
testCmd.Flags().BoolS("asan", "asan", false, "run in address sanitizer builder mode") | ||
testCmd.Flags().StringS("banner", "banner", "", "banner prefix") | ||
testCmd.Flags().BoolS("compile-only", "compile-only", false, "compile tests, but don't run them") | ||
testCmd.Flags().BoolS("k", "k", false, "keep going even when error occurred") | ||
testCmd.Flags().BoolS("list", "list", false, "list available tests") | ||
testCmd.Flags().BoolS("msan", "msan", false, "run in memory sanitizer builder mode") | ||
testCmd.Flags().BoolS("no-rebuild", "no-rebuild", false, "overrides -rebuild (historical dreg)") | ||
testCmd.Flags().BoolS("race", "race", false, "run in race builder mode (different set of tests)") | ||
testCmd.Flags().BoolS("rebuild", "rebuild", false, "rebuild everything first") | ||
testCmd.Flags().StringS("run", "run", "", "run only those tests matching the regular expression") | ||
testCmd.Flags().BoolS("v", "v", false, "verbosity") | ||
rootCmd.AddCommand(testCmd) | ||
|
||
carapace.Gen(testCmd).FlagCompletion(carapace.ActionMap{ | ||
"run": golang.ActionTests(golang.TestOpts{}.Default()), | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 versionCmd = &cobra.Command{ | ||
Use: "version", | ||
Short: "print Go version", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(versionCmd).Standalone() | ||
|
||
rootCmd.AddCommand(versionCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package main | ||
|
||
import "github.com/rsteube/carapace-bin/completers/go-tool-dist_completer/cmd" | ||
|
||
func main() { | ||
cmd.Execute() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters