MCPcopy Index your code
hub / github.com/jetify-com/devbox / Push

Method Push

internal/pullbox/pullbox.go:104–125  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

102}
103
104func (p *pullbox) Push(ctx context.Context) error {
105 if p.URL != "" {
106 ux.Finfof(os.Stderr, "Pushing global config to %s\n", p.URL)
107 } else {
108 ux.Finfof(os.Stderr, "Pushing global config\n")
109 }
110
111 if p.URL == "" {
112 profile := "default" // TODO: make this editable
113 if p.Credentials.IDToken == "" {
114 return usererr.New("Not logged in")
115 }
116 ux.Finfof(
117 os.Stderr,
118 "Logged in as %s, pushing to to devbox cloud (profile: %s)\n",
119 p.Credentials.Email,
120 profile,
121 )
122 return s3.Push(ctx, &p.Credentials, p.ProjectDir(), profile)
123 }
124 return git.Push(ctx, p.ProjectDir(), p.URL)
125}

Callers

nothing calls this directly

Calls 5

FinfofFunction · 0.92
NewFunction · 0.92
PushFunction · 0.92
PushFunction · 0.92
ProjectDirMethod · 0.65

Tested by

no test coverage detected