refactor: remove need for internal dokku calls

Avoid internal dokku calls will avoid potentially expensive subprocesses - in particular, user-auth will be re-invoked, which can be expensive.
This commit is contained in:
Jose Diaz-Gonzalez
2021-01-23 12:32:31 -05:00
parent aad7f67f7c
commit 9137be814c
11 changed files with 55 additions and 14 deletions

View File

@@ -17,6 +17,17 @@ dokku_apps() {
[[ $INSTALLED_APPS ]] && echo "$INSTALLED_APPS"
}
dokku_version() {
if [[ -f "$DOKKU_LIB_ROOT/STABLE_VERSION" ]]; then
DOKKU_VERSION=$(cat "${DOKKU_LIB_ROOT}/STABLE_VERSION")
elif [[ -f "$DOKKU_LIB_ROOT/VERSION" ]]; then
DOKKU_VERSION=$(cat "${DOKKU_LIB_ROOT}/VERSION")
else
dokku_log_fail "Unable to determine dokku's version"
fi
echo "dokku version ${DOKKU_VERSION}"
}
dokku_log_quiet() {
declare desc="log quiet formatter"
if [[ -z "$DOKKU_QUIET_OUTPUT" ]]; then