Purge cache for all apps when calling buildpacks:set-property with --global flag
This commit is contained in:
1 parent
cbacdb7e2c
commit
d7dfc5d30b
1 file changed
+12
@@ -148,8 +148,20 @@ func CommandSetProperty(appName string, property string, value string) error {
|
|||||||
|
|
||||||
common.CommandPropertySet("buildpacks", appName, property, value, DefaultProperties, GlobalProperties)
|
common.CommandPropertySet("buildpacks", appName, property, value, DefaultProperties, GlobalProperties)
|
||||||
if property == "stack" && oldStack != value {
|
if property == "stack" && oldStack != value {
|
||||||
|
if appName != "--global" {
|
||||||
return common.PlugnTrigger("post-stack-set", []string{appName, value}...)
|
return common.PlugnTrigger("post-stack-set", []string{appName, value}...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
apps, err := common.DokkuApps()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
for _, app := range apps {
|
||||||
|
if err := common.PlugnTrigger("post-stack-set", []string{app, value}...); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user