Skip to content

Commit

Permalink
only set the parameters if their labels are not blank
Browse files Browse the repository at this point in the history
  • Loading branch information
ddollar committed Jul 19, 2016
1 parent 3ba684c commit c0f65ba
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions api/models/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,10 @@ func (r *Release) Promote() error {
for _, entry := range manifest {
entryName := UpperName(entry.Name)
for _, option := range healthOptions {
val := entry.Label(fmt.Sprintf("convox.health.%s", option))
param := fmt.Sprintf("%sHealth%s", entryName, strings.Title(option))
fmt.Printf("val %s param %s", val, param)
app.Parameters[param] = val
if val := entry.Label(fmt.Sprintf("convox.health.%s", option)); val != "" {
param := fmt.Sprintf("%sHealth%s", entryName, strings.Title(option))
app.Parameters[param] = val
}
}

// set all of WebCount=1, WebCpu=0, WebMemory=256 and WebFormation=1,0,256 style parameters
Expand Down

0 comments on commit c0f65ba

Please sign in to comment.