(appBuild *buildconfigs.AppBuild)
| 134 | } |
| 135 | |
| 136 | func (o *InitOptions) writeAppFile(appBuild *buildconfigs.AppBuild) error { |
| 137 | appConfig, err := o.generateApp(appBuild) |
| 138 | if err != nil { |
| 139 | return err |
| 140 | } |
| 141 | |
| 142 | appContent, err := yaml.Marshal(appConfig) |
| 143 | if err != nil { |
| 144 | return err |
| 145 | } |
| 146 | err = os.WriteFile(AppFileName, appContent, os.ModePerm) |
| 147 | if err != nil { |
| 148 | return err |
| 149 | } |
| 150 | o.ui.PrintHeaderText("\nOutput") |
| 151 | o.ui.PrintInformationalText("Successfully updated app-build.yml\n") |
| 152 | o.ui.PrintInformationalText("Successfully updated app.yml\n") |
| 153 | o.ui.PrintHeaderText("\n**Next steps**") |
| 154 | o.ui.PrintInformationalText("Use `dev deploy` command to iterate on the app and deploy locally.\n") |
| 155 | return nil |
| 156 | } |
| 157 | |
| 158 | func (o *InitOptions) generateApp(appBuild *buildconfigs.AppBuild) (kcv1alpha1.App, error) { |
| 159 | var app kcv1alpha1.App |
no test coverage detected