Skip to content

Commit abd46b7

Browse files
authored
all: remove cloud subcommand and unused packages (#2438)
Some cleanup that removes `devbox cloud` along with other packages that aren't used anymore.
1 parent bea590f commit abd46b7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+2
-4540
lines changed

go.mod

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ require (
1414
github.com/aws/aws-sdk-go-v2/service/sts v1.28.11
1515
github.com/bmatcuk/doublestar/v4 v4.6.1
1616
github.com/briandowns/spinner v1.23.0
17-
github.com/cavaliergopher/grab/v3 v3.0.1
18-
github.com/cloudflare/ahocorasick v0.0.0-20210425175752-730270c3e184
1917
github.com/denisbrodbeck/machineid v1.0.1
2018
github.com/f1bonacc1/process-compose v1.6.1
2119
github.com/fatih/color v1.17.0
@@ -48,7 +46,6 @@ require (
4846
golang.org/x/oauth2 v0.21.0
4947
golang.org/x/sync v0.7.0
5048
golang.org/x/tools v0.22.0
51-
gopkg.in/natefinch/lumberjack.v2 v2.2.1
5249
gopkg.in/yaml.v3 v3.0.1
5350
)
5451

@@ -78,6 +75,7 @@ require (
7875
github.com/bodgit/sevenzip v1.5.1 // indirect
7976
github.com/bodgit/windows v1.0.1 // indirect
8077
github.com/buger/jsonparser v1.1.1 // indirect
78+
github.com/cavaliergopher/grab/v3 v3.0.1 // indirect
8179
github.com/charmbracelet/lipgloss v0.11.0 // indirect
8280
github.com/charmbracelet/x/ansi v0.1.2 // indirect
8381
github.com/cloudflare/circl v1.3.8 // indirect

go.sum

Lines changed: 0 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/boxcli/cloud.go

Lines changed: 0 additions & 176 deletions
This file was deleted.

internal/boxcli/generate.go

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import (
1313
"github.com/spf13/cobra"
1414

1515
"go.jetpack.io/devbox/internal/boxcli/usererr"
16-
"go.jetpack.io/devbox/internal/cloud"
1716
"go.jetpack.io/devbox/internal/devbox"
1817
"go.jetpack.io/devbox/internal/devbox/devopt"
1918
"go.jetpack.io/devbox/internal/devbox/docgen"
@@ -24,7 +23,6 @@ type generateCmdFlags struct {
2423
config configFlags
2524
force bool
2625
printEnvrcContent bool
27-
githubUsername string
2826
rootUser bool
2927
}
3028

@@ -61,7 +59,6 @@ func generateCmd() *cobra.Command {
6159
command.AddCommand(debugCmd())
6260
command.AddCommand(direnvCmd())
6361
command.AddCommand(genReadmeCmd())
64-
command.AddCommand(sshConfigCmd())
6562
flags.config.register(command)
6663

6764
return command
@@ -158,27 +155,6 @@ func direnvCmd() *cobra.Command {
158155
return command
159156
}
160157

161-
func sshConfigCmd() *cobra.Command {
162-
flags := &generateCmdFlags{}
163-
command := &cobra.Command{
164-
Use: "ssh-config",
165-
Hidden: true,
166-
Short: "Generate ssh config to connect to devbox cloud",
167-
Long: "Check ssh config and if they don't exist, it generates the configs necessary to connect to devbox cloud VMs.",
168-
Args: cobra.MaximumNArgs(0),
169-
RunE: func(cmd *cobra.Command, args []string) error {
170-
// ssh-config command is exception and it should run without a config file present
171-
_, err := cloud.SSHSetup(flags.githubUsername)
172-
return errors.WithStack(err)
173-
},
174-
}
175-
command.Flags().StringVarP(
176-
&flags.githubUsername, "username", "u", "", "GitHub username to use for ssh",
177-
)
178-
flags.config.register(command)
179-
return command
180-
}
181-
182158
func genReadmeCmd() *cobra.Command {
183159
flags := &GenerateReadmeCmdFlags{}
184160

internal/boxcli/root.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import (
1515

1616
"go.jetpack.io/devbox/internal/boxcli/featureflag"
1717
"go.jetpack.io/devbox/internal/boxcli/midcobra"
18-
"go.jetpack.io/devbox/internal/cloud/openssh/sshshim"
1918
"go.jetpack.io/devbox/internal/cmdutil"
2019
"go.jetpack.io/devbox/internal/debug"
2120
"go.jetpack.io/devbox/internal/telemetry"
@@ -82,8 +81,6 @@ func RootCmd() *cobra.Command {
8281
}))
8382
command.AddCommand(updateCmd())
8483
command.AddCommand(versionCmd())
85-
// Preview commands
86-
command.AddCommand(cloudCmd())
8784
// Internal commands
8885
command.AddCommand(genDocsCmd())
8986

@@ -120,10 +117,6 @@ func Main() {
120117
timer := debug.Timer(strings.Join(os.Args, " "))
121118
setSystemBinaryPaths()
122119
ctx := context.Background()
123-
if strings.HasSuffix(os.Args[0], "ssh") ||
124-
strings.HasSuffix(os.Args[0], "scp") {
125-
os.Exit(sshshim.Execute(ctx, os.Args))
126-
}
127120

128121
if len(os.Args) > 1 && os.Args[1] == "upload-telemetry" {
129122
// This subcommand is hidden and only run by devbox itself as a

0 commit comments

Comments
 (0)