diff --git a/docs/development/plugin-creation.md b/docs/development/plugin-creation.md index 001fe34fb04..55098a82636 100644 --- a/docs/development/plugin-creation.md +++ b/docs/development/plugin-creation.md @@ -15,7 +15,7 @@ The below plugin is a dummy `dokku hello` plugin. If your plugin exposes command ```shell #!/usr/bin/env bash set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x -source "$(dirname $0)/../common/functions" +source "$PLUGIN_PATH/common/functions" case "$1" in hello) diff --git a/docs/development/pluginhooks.md b/docs/development/pluginhooks.md index b725be799fa..c61df917697 100644 --- a/docs/development/pluginhooks.md +++ b/docs/development/pluginhooks.md @@ -253,7 +253,7 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x -source "$(dirname $0)/../common/functions" +source "$PLUGIN_PATH/common/functions" dokku_log_info1" Installing GraphicsMagick..." @@ -279,7 +279,7 @@ docker commit $ID $IMAGE > /dev/null set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x -source "$(dirname $0)/../common/functions" +source "$PLUGIN_PATH/common/functions" dokku_log_info1" Installing $CONTAINER_PACKAGE..." @@ -360,7 +360,7 @@ fi set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x -source "$(dirname $0)/../common/functions" +source "$PLUGIN_PATH/common/functions" APP="$1" IMAGE="dokku/$APP" diff --git a/plugins/00_dokku-standard/commands b/plugins/00_dokku-standard/commands index eb939472d0f..7c71a143dff 100755 --- a/plugins/00_dokku-standard/commands +++ b/plugins/00_dokku-standard/commands @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x -source "$(dirname $0)/../common/functions" +source "$PLUGIN_PATH/common/functions" case "$1" in build) diff --git a/plugins/20_events/commands b/plugins/20_events/commands index 66b72704f1d..c3b8177354f 100755 --- a/plugins/20_events/commands +++ b/plugins/20_events/commands @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x -source "$(dirname $0)/../common/functions" +source "$PLUGIN_PATH/common/functions" PLUGIN_DIR="$(dirname $0)" diff --git a/plugins/20_events/hook b/plugins/20_events/hook index 0f21da9fb3f..5357e931b3e 100755 --- a/plugins/20_events/hook +++ b/plugins/20_events/hook @@ -1,5 +1,5 @@ #!/usr/bin/env bash set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x -source "$(dirname $0)/../common/functions" +source "$PLUGIN_PATH/common/functions" [[ ! "$DOKKU_EVENTS" ]] || dokku_log_pluginhook_call "$(basename $0)" "$@" diff --git a/plugins/20_events/install b/plugins/20_events/install index 62435390f55..8951bd4d15e 100755 --- a/plugins/20_events/install +++ b/plugins/20_events/install @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x -source "$(dirname $0)/../common/functions" +source "$PLUGIN_PATH/common/functions" DOKKU_RSYSLOG_FILTER=/etc/rsyslog.d/99-dokku.conf DOKKU_LOGROTATE_FILE=/etc/logrotate.d/dokku diff --git a/plugins/apps/commands b/plugins/apps/commands index d1d157ce96a..4e303e26d46 100755 --- a/plugins/apps/commands +++ b/plugins/apps/commands @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x -source "$(dirname $0)/../common/functions" +source "$PLUGIN_PATH/common/functions" case "$1" in apps) diff --git a/plugins/build-env/pre-build b/plugins/build-env/pre-build index 033973c4092..e491484484e 100755 --- a/plugins/build-env/pre-build +++ b/plugins/build-env/pre-build @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x -source "$(dirname $0)/../common/functions" +source "$PLUGIN_PATH/common/functions" APP="$1"; IMAGE="dokku/$APP"; BUILD_ENV="" diff --git a/plugins/checks/check-deploy b/plugins/checks/check-deploy index 91b2493a1d0..1b30e987622 100755 --- a/plugins/checks/check-deploy +++ b/plugins/checks/check-deploy @@ -35,7 +35,7 @@ # set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x -source "$(dirname $0)/../common/functions" +source "$PLUGIN_PATH/common/functions" APP="$1"; DOKKU_APP_CONTAINER_ID="$2"; DOKKU_APP_CONTAINER_TYPE="$3"; DOKKU_APP_LISTEN_PORT="$4"; DOKKU_APP_LISTEN_IP="$5" if [[ -z "$DOKKU_APP_LISTEN_PORT" ]] && [[ -f "$DOKKU_ROOT/$APP/PORT" ]]; then diff --git a/plugins/config/commands b/plugins/config/commands index 11ec22ef7c1..35ffe39bfe0 100755 --- a/plugins/config/commands +++ b/plugins/config/commands @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x -source "$(dirname $0)/../common/functions" +source "$PLUGIN_PATH/common/functions" config_create () { [ -f $ENV_FILE ] || { diff --git a/plugins/config/docker-args-deploy b/plugins/config/docker-args-deploy index 8d1f1ef2446..2b475265bba 100755 --- a/plugins/config/docker-args-deploy +++ b/plugins/config/docker-args-deploy @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x -source "$(dirname $0)/../common/functions" +source "$PLUGIN_PATH/common/functions" STDIN=$(cat); APP="$1"; IMAGE="dokku/$APP" DOCKERFILE_ENV_FILE="$DOKKU_ROOT/$APP/DOCKERFILE_ENV_FILE" diff --git a/plugins/docker-options/commands b/plugins/docker-options/commands index 7a54ff1fc80..3834660a93b 100755 --- a/plugins/docker-options/commands +++ b/plugins/docker-options/commands @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x -source "$(dirname $0)/../common/functions" +source "$PLUGIN_PATH/common/functions" PHASES=(build deploy run) diff --git a/plugins/domains/commands b/plugins/domains/commands index dba5335eafe..72ef45c9714 100755 --- a/plugins/domains/commands +++ b/plugins/domains/commands @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x -source "$(dirname $0)/../common/functions" +source "$PLUGIN_PATH/common/functions" RE_IPV4="([0-9]{1,3}[\.]){3}[0-9]{1,3}" diff --git a/plugins/git/commands b/plugins/git/commands index ce1ec55811d..4848db0f3c0 100755 --- a/plugins/git/commands +++ b/plugins/git/commands @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x -source "$(dirname $0)/../common/functions" +source "$PLUGIN_PATH/common/functions" git_build_app_repo() { verify_app_name "$1" diff --git a/plugins/git/receive-app b/plugins/git/receive-app index 328fbeb1d94..7fe95cc1a94 100755 --- a/plugins/git/receive-app +++ b/plugins/git/receive-app @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x -source "$(dirname $0)/../common/functions" +source "$PLUGIN_PATH/common/functions" APP="$1"; REV="$2" diff --git a/plugins/nginx-vhosts/commands b/plugins/nginx-vhosts/commands index 419f1793481..c0d8ebb0461 100755 --- a/plugins/nginx-vhosts/commands +++ b/plugins/nginx-vhosts/commands @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x -source "$(dirname $0)/../common/functions" +source "$PLUGIN_PATH/common/functions" validate_nginx () { set +e diff --git a/plugins/nginx-vhosts/post-deploy b/plugins/nginx-vhosts/post-deploy index 145bdffa3af..f2987d070ca 100755 --- a/plugins/nginx-vhosts/post-deploy +++ b/plugins/nginx-vhosts/post-deploy @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x -source "$(dirname $0)/../common/functions" +source "$PLUGIN_PATH/common/functions" APP="$1" if [[ -f "$DOKKU_ROOT/$APP/IP.web.1" ]] && [[ -f "$DOKKU_ROOT/$APP/PORT.web.1" ]]; then diff --git a/plugins/nginx-vhosts/post-domains-update b/plugins/nginx-vhosts/post-domains-update index 30d8006f46a..945057998a7 100755 --- a/plugins/nginx-vhosts/post-domains-update +++ b/plugins/nginx-vhosts/post-domains-update @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x -source "$(dirname $0)/../common/functions" +source "$PLUGIN_PATH/common/functions" APP="$1" diff --git a/plugins/ps/commands b/plugins/ps/commands index f6e7e6480f7..bdebeaa3ba9 100755 --- a/plugins/ps/commands +++ b/plugins/ps/commands @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x -source "$(dirname $0)/../common/functions" +source "$PLUGIN_PATH/common/functions" source "$(dirname $0)/functions" case "$1" in diff --git a/plugins/ps/functions b/plugins/ps/functions index 0cb73beacce..6517d8259a7 100755 --- a/plugins/ps/functions +++ b/plugins/ps/functions @@ -1,9 +1,9 @@ #!/usr/bin/env bash set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x -source "$(dirname $0)/../common/functions" +source "$PLUGIN_PATH/common/functions" release_and_deploy() { - source "$(dirname $0)/../common/functions" + source "$PLUGIN_PATH/common/functions" local APP="$1"; local IMAGE="dokku/$APP" if verify_image "$IMAGE"; then diff --git a/plugins/ps/pre-deploy b/plugins/ps/pre-deploy index bc4f77c942b..80488ed13df 100755 --- a/plugins/ps/pre-deploy +++ b/plugins/ps/pre-deploy @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x -source "$(dirname $0)/../common/functions" +source "$PLUGIN_PATH/common/functions" source "$(dirname $0)/functions" APP="$1"