Merge pull request #1428 from jimeh/use-plugin-path-env-var

Use `$PLUGIN_PATH` instead of `$(dirname $0)/..`
This commit is contained in:
Jose Diaz-Gonzalez
2015-08-28 10:35:06 -04:00
21 changed files with 24 additions and 24 deletions

View File

@@ -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)

View File

@@ -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"

View File

@@ -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)

View File

@@ -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)"

View File

@@ -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)" "$@"

View File

@@ -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

View File

@@ -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)

View File

@@ -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=""

View File

@@ -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

View File

@@ -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 ] || {

View File

@@ -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"

View File

@@ -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)

View File

@@ -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}"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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

View File

@@ -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

View File

@@ -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"

View File

@@ -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

View File

@@ -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

View File

@@ -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"