fix: correct issues in parsing and writing an updated app.json
This commit is contained in:
@@ -561,13 +561,13 @@ func injectDokkuScale(appName string, image string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
processType := procParts[0]
|
processType := procParts[0]
|
||||||
procCount, err := strconv.Atoi(procParts[1])
|
quantity, err := strconv.Atoi(procParts[1])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
appJSON.Formation[processType] = Formation{
|
appJSON.Formation[processType] = Formation{
|
||||||
Quantity: procCount,
|
Quantity: quantity,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -576,5 +576,5 @@ func injectDokkuScale(appName string, image string) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
return ioutil.WriteFile(dokkuScaleFile, b, 0644)
|
return ioutil.WriteFile(GetAppjsonPath(appName), b, 0644)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ func main() {
|
|||||||
case "ps-set-scale":
|
case "ps-set-scale":
|
||||||
appName := flag.Arg(0)
|
appName := flag.Arg(0)
|
||||||
appName, args := common.ShiftString(flag.Args())
|
appName, args := common.ShiftString(flag.Args())
|
||||||
skipDeploy, processTuples := common.ShiftString(args)
|
skipDeploy, args := common.ShiftString(args)
|
||||||
clearExisting, processTuples := common.ShiftString(args)
|
clearExisting, processTuples := common.ShiftString(args)
|
||||||
err = ps.TriggerPsSetScale(appName, common.ToBool(skipDeploy), common.ToBool(clearExisting), processTuples)
|
err = ps.TriggerPsSetScale(appName, common.ToBool(skipDeploy), common.ToBool(clearExisting), processTuples)
|
||||||
case "report":
|
case "report":
|
||||||
|
|||||||
Reference in New Issue
Block a user