chore: rename stacks-set to stack-set
You can only set one stack...
This commit is contained in:
1 parent
bad90b2b1d
commit
b5c85ad5be
7 files changed
+10
-10
No files matched your search
@@ -9,7 +9,7 @@ buildpacks:list <app> # List all buildpacks for an app
|
|||||||
buildpacks:remove <app> <buildpack> # Remove a buildpack set on the app
|
buildpacks:remove <app> <buildpack> # Remove a buildpack set on the app
|
||||||
buildpacks:report [<app>] [<flag>] # Displays a buildpack report for one or more apps
|
buildpacks:report [<app>] [<flag>] # Displays a buildpack report for one or more apps
|
||||||
buildpacks:set [--index 1] <app> <buildpack> # Set new app buildpack at a given position defaulting to the first buildpack if no index is specified
|
buildpacks:set [--index 1] <app> <buildpack> # Set new app buildpack at a given position defaulting to the first buildpack if no index is specified
|
||||||
buildpacks:stacks-set <app> <stack> # Sets the stack of an app
|
buildpacks:stack-set <app> <stack> # Sets the stack of an app
|
||||||
```
|
```
|
||||||
|
|
||||||
> Warning: If using the `buildpacks` plugin, be sure to unset any `BUILDPACK_URL` and remove any such entries from a committed `.env` file. A specified `BUILDPACK_URL` will always override a `.buildpacks` file or the buildpacks plugin.
|
> Warning: If using the `buildpacks` plugin, be sure to unset any `BUILDPACK_URL` and remove any such entries from a committed `.env` file. A specified `BUILDPACK_URL` will always override a `.buildpacks` file or the buildpacks plugin.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
SUBCOMMANDS = subcommands/add subcommands/clear subcommands/list subcommands/remove subcommands/report subcommands/set subcommands/stacks-set
|
SUBCOMMANDS = subcommands/add subcommands/clear subcommands/list subcommands/remove subcommands/report subcommands/set subcommands/stack-set
|
||||||
TRIGGERS = triggers/buildpack-stack-name triggers/install triggers/post-app-clone-setup triggers/post-app-rename-setup triggers/post-delete triggers/post-extract triggers/report
|
TRIGGERS = triggers/buildpack-stack-name triggers/install triggers/post-app-clone-setup triggers/post-app-rename-setup triggers/post-delete triggers/post-extract triggers/report
|
||||||
BUILD = commands subcommands triggers
|
BUILD = commands subcommands triggers
|
||||||
PLUGIN_NAME = buildpacks
|
PLUGIN_NAME = buildpacks
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ func reportComputedStack(appName string) string {
|
|||||||
|
|
||||||
b, _ := common.PlugnTriggerOutput("config-get", []string{appName, "DOKKU_IMAGE"}...)
|
b, _ := common.PlugnTriggerOutput("config-get", []string{appName, "DOKKU_IMAGE"}...)
|
||||||
if dokkuImage := strings.TrimSpace(string(b[:])); dokkuImage != "" {
|
if dokkuImage := strings.TrimSpace(string(b[:])); dokkuImage != "" {
|
||||||
common.LogWarn("Deprecated: use buildpacks:stacks-set instead of specifying DOKKU_IMAGE environment variable")
|
common.LogWarn("Deprecated: use buildpacks:stack-set instead of specifying DOKKU_IMAGE environment variable")
|
||||||
return dokkuImage
|
return dokkuImage
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ Additional commands:`
|
|||||||
buildpacks:remove <app> <buildpack>, Remove a buildpack set on the app
|
buildpacks:remove <app> <buildpack>, Remove a buildpack set on the app
|
||||||
buildpacks:report [<app>] [<flag>], Displays a buildpack report for one or more apps
|
buildpacks:report [<app>] [<flag>], Displays a buildpack report for one or more apps
|
||||||
buildpacks:set [--index 1] <app> <buildpack>, Set new app buildpack at a given position defaulting to the first buildpack if no index is specified
|
buildpacks:set [--index 1] <app> <buildpack>, Set new app buildpack at a given position defaulting to the first buildpack if no index is specified
|
||||||
buildpacks:stacks-set <app> <stack>, Sets the stack of an app
|
buildpacks:stack-set <app> <stack>, Sets the stack of an app
|
||||||
`
|
`
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -57,8 +57,8 @@ func main() {
|
|||||||
appName := args.Arg(0)
|
appName := args.Arg(0)
|
||||||
buildpack := args.Arg(1)
|
buildpack := args.Arg(1)
|
||||||
err = buildpacks.CommandSet(appName, buildpack, *index)
|
err = buildpacks.CommandSet(appName, buildpack, *index)
|
||||||
case "stacks-set":
|
case "stack-set":
|
||||||
args := flag.NewFlagSet("buildpacks:stacks-set", flag.ExitOnError)
|
args := flag.NewFlagSet("buildpacks:stack-set", flag.ExitOnError)
|
||||||
global := args.Bool("global", false, "--global: set a global property")
|
global := args.Bool("global", false, "--global: set a global property")
|
||||||
args.Parse(os.Args[2:])
|
args.Parse(os.Args[2:])
|
||||||
appName := args.Arg(0)
|
appName := args.Arg(0)
|
||||||
@@ -67,7 +67,7 @@ func main() {
|
|||||||
appName = "--global"
|
appName = "--global"
|
||||||
stack = args.Arg(0)
|
stack = args.Arg(0)
|
||||||
}
|
}
|
||||||
err = buildpacks.CommandStacksSet(appName, stack)
|
err = buildpacks.CommandStackSet(appName, stack)
|
||||||
default:
|
default:
|
||||||
common.LogFail(fmt.Sprintf("Invalid plugin subcommand call: %s", subcommand))
|
common.LogFail(fmt.Sprintf("Invalid plugin subcommand call: %s", subcommand))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -139,8 +139,8 @@ func CommandSet(appName string, buildpack string, index int) error {
|
|||||||
return common.PropertyListSet("buildpacks", appName, "buildpacks", buildpack, index)
|
return common.PropertyListSet("buildpacks", appName, "buildpacks", buildpack, index)
|
||||||
}
|
}
|
||||||
|
|
||||||
// CommandStacksSet implements buildpacks:stacks-set
|
// CommandStackSet implements buildpacks:stack-set
|
||||||
func CommandStacksSet(appName string, stack string) error {
|
func CommandStackSet(appName string, stack string) error {
|
||||||
common.CommandPropertySet("buildpacks", appName, "stack", stack, DefaultProperties, GlobalProperties)
|
common.CommandPropertySet("buildpacks", appName, "stack", stack, DefaultProperties, GlobalProperties)
|
||||||
return common.PlugnTrigger("post-stack-set", []string{appName, stack}...)
|
return common.PlugnTrigger("post-stack-set", []string{appName, stack}...)
|
||||||
}
|
}
|
||||||
@@ -25,7 +25,7 @@ func TriggerBuildpackStackName(appName string) error {
|
|||||||
b, _ := common.PlugnTriggerOutput("config-get", []string{appName, "DOKKU_IMAGE"}...)
|
b, _ := common.PlugnTriggerOutput("config-get", []string{appName, "DOKKU_IMAGE"}...)
|
||||||
dokkuImage := strings.TrimSpace(string(b[:]))
|
dokkuImage := strings.TrimSpace(string(b[:]))
|
||||||
if dokkuImage != "" {
|
if dokkuImage != "" {
|
||||||
common.LogWarn("Deprecated: use buildpacks:stacks-set instead of specifying DOKKU_IMAGE environment variable")
|
common.LogWarn("Deprecated: use buildpacks:stack-set instead of specifying DOKKU_IMAGE environment variable")
|
||||||
fmt.Println(dokkuImage)
|
fmt.Println(dokkuImage)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user