chore: remove deprecated common functions

This commit is contained in:
Jose Diaz-Gonzalez
2023-02-12 13:08:45 -05:00
parent 7f2a66df88
commit d27c8f09d1
2 changed files with 3 additions and 32 deletions

View File

@@ -15,3 +15,6 @@
- `apps#apps_destroy()` is removed in favor of `plugn trigger app-destroy`.
- `apps#apps_exists()` is removed in favor of `plugn trigger app-exists`.
- `apps#apps_maybe_create()` is removed in favor of `plugn trigger app-maybe-create`.
- The following common shell functions have been removed.
- `common#is_container_running()` (deprecated since 0.12.6) is removed in favor of `common#is_container_status()`.
- `common#is_app_running()` (deprecated since 0.22.0) is removed in favor of `ps#fn-ps-is-app-running()`.

View File

@@ -573,22 +573,6 @@ is_deployed() {
"$PLUGIN_CORE_AVAILABLE_PATH/common/common" --quiet is-deployed "$APP"
}
is_container_running() {
declare desc="return 0 if given docker container id is in running state"
declare deprecated=true
declare CID="$1"
local CONTAINER_STATUS
dokku_log_warn "Deprecated: common#is_container_status"
CONTAINER_STATUS=$("$DOCKER_BIN" container inspect --format '{{.State.Running}}' "$CID" || true)
if [[ "$CONTAINER_STATUS" == "true" ]]; then
return 0
fi
return 1
}
is_container_status() {
declare desc="return 0 if given docker container id is in given state"
local CID=$1
@@ -602,22 +586,6 @@ is_container_status() {
return 1
}
is_app_running() {
declare desc="return 0 if given app has a running container"
declare deprecated=true
local APP="$1"
dokku_log_warn "Deprecated: ps#fn-ps-is-app-running"
local APP_RUNNING_CONTAINER_IDS=$(get_app_running_container_ids "$APP" 2>/dev/null)
if [[ -n "$APP_RUNNING_CONTAINER_IDS" ]]; then
return 0
else
return 1
fi
}
dokku_build() {
declare desc="build phase"
declare APP="$1" IMAGE_SOURCE_TYPE="$2" SOURCECODE_WORK_DIR="$3"