Files
dokku/plugins/config/functions
Alex Quick 294d4b1f29 [config] first cut of config rewritten in golang
still to do:
* Rework disk format to be okay with quotes
* Fix Dockerfile deployments
* Dedup code in the subcommands
* Add --encode
* Add deploytests for the new stuff
* Restore some log messages (should I make some helpers in common?)
* Restore some functions that may be used by 3d-party plugins
2017-09-27 23:56:39 -04:00

30 lines
652 B
Bash
Executable File

#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
config_export() {
declare desc="returns export command for config variable of specified type (app/global)"
local CONFIG_TYPE="$1"
local APP="$2"
if [[ $CONFIG_TYPE == "global" ]]; then
APP="--global"
fi
dokku config:export "$APP"
return 0
}
config_get() {
declare desc="get value of given config var"
dokku config:get "$@"
}
config_set() {
declare desc="set value of given config var"
dokku config:set "$@"
}
config_unset() {
declare desc="set value of given config var"
dokku config:unset "$@"
}