(ctx context.Context, cmd *cli.Command)
| 34 | } |
| 35 | |
| 36 | func commandApply(ctx context.Context, cmd *cli.Command) error { |
| 37 | ce := clienv.FromCLI(cmd) |
| 38 | |
| 39 | proj, err := ce.GetAppInfo(ctx, cmd.String(flagSubdomain)) |
| 40 | if err != nil { |
| 41 | return cli.Exit(fmt.Sprintf("Failed to get app info: %v", err), 1) |
| 42 | } |
| 43 | |
| 44 | ce.Infoln("Validating configuration...") |
| 45 | |
| 46 | cfg, _, err := ValidateRemote( |
| 47 | ctx, |
| 48 | ce, |
| 49 | proj.GetSubdomain(), |
| 50 | proj.GetID(), |
| 51 | ) |
| 52 | if err != nil { |
| 53 | return cli.Exit(err.Error(), 1) |
| 54 | } |
| 55 | |
| 56 | if err := Apply(ctx, ce, proj.ID, cfg, cmd.Bool(flagYes)); err != nil { |
| 57 | return cli.Exit(err.Error(), 1) |
| 58 | } |
| 59 | |
| 60 | return nil |
| 61 | } |
| 62 | |
| 63 | func Apply( |
| 64 | ctx context.Context, |
nothing calls this directly
no test coverage detected