refactor: rename to deploy-source

This commit is contained in:
Jose Diaz-Gonzalez committed 2018-03-03 19:11:49 -05:00
1 parent 726c1571eb
commit 9a1dd41e9f
4 files changed
+14 -14

No files matched your search

+3 -3
View File
@@ -147,9 +147,9 @@ case "$DOKKU_DISTRO" in
esac esac
``` ```
### `deploy-method` ### `deploy-source`
- Description: Used for reporting what the current detected deployment method is. The first detected method should always win. - Description: Used for reporting what the current detected deployment source is. The first detected source should always win.
- Invoked by: `dokku apps:report` - Invoked by: `dokku apps:report`
- Arguments: `$APP` - Arguments: `$APP`
- Example: - Example:
@@ -163,7 +163,7 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
APP="$1" APP="$1"
STDIN=$(cat) STDIN=$(cat)
# bail if another method is detected # bail if another source is detected
if [[ -n "$STDIN" ]]; then if [[ -n "$STDIN" ]]; then
echo "$STDIN" echo "$STDIN"
return return
+1 -1
View File
@@ -15,7 +15,7 @@ report_single_app() {
local flag_map=( local flag_map=(
"--app-dir: $APP_DIR" "--app-dir: $APP_DIR"
"--git-sha: $(GIT_DIR="$APP_DIR" git rev-parse --short HEAD 2> /dev/null || false)" "--git-sha: $(GIT_DIR="$APP_DIR" git rev-parse --short HEAD 2> /dev/null || false)"
"--deploy-method: $(plugn trigger deploy-method "$APP")" "--deploy-source: $(plugn trigger deploy-source "$APP")"
) )
if [[ -z "$INFO_FLAG" ]]; then if [[ -z "$INFO_FLAG" ]]; then
@@ -1,14 +1,14 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
git_deploy_method() { git_deploy_source() {
declare desc="git deploy-method plugin trigger" declare desc="git deploy-source plugin trigger"
declare trigger="git_deploy_method" declare trigger="git_deploy_source"
declare APP="$1" declare APP="$1"
local STDIN local STDIN
STDIN=$(cat) STDIN=$(cat)
# bail if another method is detected # bail if another source is detected
if [[ -n "$STDIN" ]]; then if [[ -n "$STDIN" ]]; then
echo "$STDIN" echo "$STDIN"
return return
@@ -19,4 +19,4 @@ git_deploy_method() {
fi fi
} }
git_deploy_method "$@" git_deploy_source "$@"
@@ -1,14 +1,14 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
tar_deploy_method() { tar_deploy_source() {
declare desc="tar deploy-method plugin trigger" declare desc="tar deploy-source plugin trigger"
declare trigger="tar_deploy_method" declare trigger="tar_deploy_source"
declare APP="$1" declare APP="$1"
local STDIN local STDIN
STDIN=$(cat) STDIN=$(cat)
# bail if another method is detected # bail if another source is detected
if [[ -n "$STDIN" ]]; then if [[ -n "$STDIN" ]]; then
echo "$STDIN" echo "$STDIN"
return return
@@ -19,4 +19,4 @@ tar_deploy_method() {
fi fi
} }
tar_deploy_method "$@" tar_deploy_source "$@"