|
|
@@ -31,10 +31,18 @@ func AppProtoFromYaml(ctx context.Context, porterYamlBytes []byte, appName strin
|
|
|
porterYaml.Name = appName
|
|
|
}
|
|
|
|
|
|
+ if porterYaml.Name != "" && appName != "" && porterYaml.Name != appName {
|
|
|
+ return nil, nil, telemetry.Error(ctx, span, nil, "name specified in porter.yaml does not match app name")
|
|
|
+ }
|
|
|
+
|
|
|
appProto := &porterv1.PorterApp{
|
|
|
Name: porterYaml.Name,
|
|
|
}
|
|
|
|
|
|
+ if appProto.Name == "" {
|
|
|
+ return nil, nil, telemetry.Error(ctx, span, nil, "app name is empty")
|
|
|
+ }
|
|
|
+
|
|
|
if porterYaml.Build != nil {
|
|
|
appProto.Build = &porterv1.Build{
|
|
|
Context: porterYaml.Build.Context,
|