refactor: rename to deploy-source

This commit is contained in:
Jose Diaz-Gonzalez
2018-03-03 19:11:49 -05:00
parent 726c1571eb
commit 9a1dd41e9f
4 changed files with 14 additions and 14 deletions

View File

@@ -147,9 +147,9 @@ case "$DOKKU_DISTRO" in
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`
- Arguments: `$APP`
- Example:
@@ -163,7 +163,7 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
APP="$1"
STDIN=$(cat)
# bail if another method is detected
# bail if another source is detected
if [[ -n "$STDIN" ]]; then
echo "$STDIN"
return

View File

@@ -15,7 +15,7 @@ report_single_app() {
local flag_map=(
"--app-dir: $APP_DIR"
"--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

View File

@@ -1,14 +1,14 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
git_deploy_method() {
declare desc="git deploy-method plugin trigger"
declare trigger="git_deploy_method"
git_deploy_source() {
declare desc="git deploy-source plugin trigger"
declare trigger="git_deploy_source"
declare APP="$1"
local STDIN
STDIN=$(cat)
# bail if another method is detected
# bail if another source is detected
if [[ -n "$STDIN" ]]; then
echo "$STDIN"
return
@@ -19,4 +19,4 @@ git_deploy_method() {
fi
}
git_deploy_method "$@"
git_deploy_source "$@"

View File

@@ -1,14 +1,14 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
tar_deploy_method() {
declare desc="tar deploy-method plugin trigger"
declare trigger="tar_deploy_method"
tar_deploy_source() {
declare desc="tar deploy-source plugin trigger"
declare trigger="tar_deploy_source"
declare APP="$1"
local STDIN
STDIN=$(cat)
# bail if another method is detected
# bail if another source is detected
if [[ -n "$STDIN" ]]; then
echo "$STDIN"
return
@@ -19,4 +19,4 @@ tar_deploy_method() {
fi
}
tar_deploy_method "$@"
tar_deploy_source "$@"