Skip to content

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ianedwards committed Sep 28, 2023
1 parent 2c6fa6c commit cb7b145
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cli/cmd/v2/apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func Apply(ctx context.Context, inp ApplyInput) error {
}

// overrides incorporated into the app contract baed on the deployment target
var b64AppOverides string
var b64AppOverrides string

appName := inp.AppName
if porterYamlExists {
Expand Down Expand Up @@ -120,14 +120,14 @@ func Apply(ctx context.Context, inp ApplyInput) error {
}

if inp.PreviewApply && parseResp.PreviewApp != nil {
b64AppOverides = parseResp.PreviewApp.B64AppProto
b64AppOverrides = parseResp.PreviewApp.B64AppProto

envGroupResp, err := client.CreateOrUpdateAppEnvironment(ctx, cliConf.Project, cliConf.Cluster, appName, deploymentTargetID, parseResp.PreviewApp.EnvVariables, parseResp.PreviewApp.EnvSecrets, parseResp.PreviewApp.B64AppProto)
if err != nil {
return fmt.Errorf("error calling create or update app environment group endpoint: %w", err)
}

b64AppOverides, err = updateEnvGroupsInProto(ctx, b64AppOverides, envGroupResp.EnvGroups)
b64AppOverrides, err = updateEnvGroupsInProto(ctx, b64AppOverrides, envGroupResp.EnvGroups)
if err != nil {
return fmt.Errorf("error updating app env group in proto: %w", err)
}
Expand All @@ -147,7 +147,7 @@ func Apply(ctx context.Context, inp ApplyInput) error {
ClusterID: cliConf.Cluster,
AppName: appName,
Base64AppProto: b64AppProto,
Base64AppOverrides: b64AppOverides,
Base64AppOverrides: b64AppOverrides,
DeploymentTarget: deploymentTargetID,
CommitSHA: commitSHA,
})
Expand Down

0 comments on commit cb7b145

Please sign in to comment.