mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
The DOKKU_APP_TYPE has long since ceased to be the correct way to specify the builder for the application. It's only usage has been during the detection phase, specifically to ensure that the herokuish plugin injects the correct docker arguments during the build. As such, it is safe to migrate away to a property in a patch release. Users that seek to set a specific builder should use 'dokku builder:set $APP selected' instead. Refs #7863
41 lines
949 B
Go
41 lines
949 B
Go
package builder
|
|
|
|
import (
|
|
"errors"
|
|
|
|
"github.com/dokku/dokku/plugins/common"
|
|
)
|
|
|
|
// CommandReport displays a builder report for one or more apps
|
|
func CommandReport(appName string, format string, infoFlag string) error {
|
|
if len(appName) == 0 {
|
|
apps, err := common.DokkuApps()
|
|
if err != nil {
|
|
if errors.Is(err, common.NoAppsExist) {
|
|
common.LogWarn(err.Error())
|
|
return nil
|
|
}
|
|
return err
|
|
}
|
|
for _, appName := range apps {
|
|
if err := ReportSingleApp(appName, format, infoFlag); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
|
|
return ReportSingleApp(appName, format, infoFlag)
|
|
}
|
|
|
|
// CommandSet set or clear a builder property for an app
|
|
func CommandSet(appName string, property string, value string) error {
|
|
if property == "detected" {
|
|
common.LogWarn("detected is a read-only property")
|
|
return nil
|
|
}
|
|
|
|
common.CommandPropertySet("builder", appName, property, value, DefaultProperties, GlobalProperties)
|
|
return nil
|
|
}
|