You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Warn if manifest was created with an older CLI version.
62
64
checkToolingVersion(manifest)
63
65
66
+
// Resolve deployment name when not explicitly provided.
67
+
ifdeployment=="" {
68
+
deployment=manifest.DefaultDeployment()
69
+
}
70
+
ifdeployment=="" {
71
+
iflen(manifest.Deployments) ==0 {
72
+
returnnil, "", nil, fmt.Errorf("no deployments configured\nHint: use `oasis rofl create` to register a new ROFL app and create a deployment")
73
+
}
74
+
printAvailableDeployments(manifest)
75
+
returnnil, "", nil, fmt.Errorf("no deployment selected\nHint: Run this command with --deployment to select one or `oasis rofl set-default <name>` to set a default deployment")
76
+
}
77
+
64
78
d, ok:=manifest.Deployments[deployment]
65
79
if!ok {
66
-
fmt.Println("The following deployments are configured in the app manifest:")
67
-
forname:=rangemanifest.Deployments {
68
-
fmt.Printf(" - %s\n", name)
69
-
}
70
-
returnnil, nil, fmt.Errorf("deployment '%s' does not exist", deployment)
80
+
printAvailableDeployments(manifest)
81
+
returnnil, "", nil, fmt.Errorf("deployment '%s' does not exist", deployment)
cobra.CheckErr(fmt.Errorf("ROFL app identifier already defined (%s) for deployment '%s', refusing to overwrite", deployment.AppID, roflCommon.DeploymentName))
225
+
cobra.CheckErr(fmt.Errorf("ROFL app identifier already defined (%s) for deployment '%s', refusing to overwrite", deployment.AppID, deploymentName))
220
226
}
221
227
222
228
// An existing deployment is defined, but without an AppID. Load everything else for
223
229
// the deployment and proceed with creating a new app.
0 commit comments