The `stack` property lived on the `buildpacks` plugin but was shared by both the herokuish and pack builders, so a value valid for one builder broke the other. Each builder now owns its own `stack` property managed via `builder-herokuish:set` and `builder-pack:set`, while `buildpacks:set-property stack` is deprecated and forwards the value to the builder detected from it; existing values migrate automatically on upgrade and changing a builder's stack clears that builder's cache.
25 lines
696 B
Go
25 lines
696 B
Go
package buildpacks
|
|
|
|
import "strings"
|
|
|
|
var (
|
|
// DefaultProperties is a map of all valid buildpacks properties with corresponding default property values
|
|
DefaultProperties = map[string]string{}
|
|
|
|
// GlobalProperties is a map of all valid global buildpacks properties
|
|
GlobalProperties = map[string]bool{}
|
|
)
|
|
|
|
// isHerokuishStack reports whether a stack value targets the herokuish builder
|
|
func isHerokuishStack(value string) bool {
|
|
return strings.Contains(value, "herokuish")
|
|
}
|
|
|
|
// builderForStack returns the builder plugin name a stack value should be written to
|
|
func builderForStack(value string) string {
|
|
if isHerokuishStack(value) {
|
|
return "builder-herokuish"
|
|
}
|
|
return "builder-pack"
|
|
}
|