(ctx context.Context)
| 102 | } |
| 103 | |
| 104 | func (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 | } |
nothing calls this directly
no test coverage detected