use declare for description variable

This commit is contained in:
Michael Hobbs committed 2016-03-08 15:30:34 -05:00
1 parent d8e00f4f8a
commit 987c5cfb9c
111 files changed
+225 -225

No files matched your search

@@ -3,7 +3,7 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
get_phase_script() {
local desc="extracts app.json from app image and returns the appropriate json key/value"
declare desc="extracts app.json from app image and returns the appropriate json key/value"
local IMAGE="$1"; local PHASE_SCRIPT_KEY="$2"
local TMP_WORK_DIR=$(mktemp -d -t "dokku_get_phase_script.XXXX")
local APP_JSON_FILE="$TMP_WORK_DIR/app.json"
@@ -21,7 +21,7 @@ get_phase_script() {
}
execute_script() {
local desc="executes appropriate phase script key from app.json"
declare desc="executes appropriate phase script key from app.json"
local APP="$1"; local IMAGE="$2"; local PHASE_SCRIPT_KEY="$3"
local SCRIPT_CMD=$(get_phase_script "$IMAGE" "$PHASE_SCRIPT_KEY")
if [[ -n "$SCRIPT_CMD" ]];then
@@ -46,7 +46,7 @@ execute_script() {
}
exec_app_json_scripts() {
local desc="core app.json scripts execution"
declare desc="core app.json scripts execution"
local trigger="$0 app_json_scripts"
local APP="$1"
+1 -1
View File
@@ -4,7 +4,7 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/config/functions"
dokku_build_cmd() {
local desc="build phase"
declare desc="build phase"
local cmd="build"
local APP="$2"; local IMAGE_SOURCE_TYPE="$3"; local TMP_WORK_DIR="$4"; local IMAGE=$(get_app_image_name "$APP")
verify_app_name "$APP"
@@ -3,7 +3,7 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
dokku_cleanup_cmd(){
local desc="cleans up old deployment cruft"
declare desc="cleans up old deployment cruft"
local cmd="cleanup"
docker_cleanup
+2 -2
View File
@@ -6,7 +6,7 @@ source "$PLUGIN_AVAILABLE_PATH/config/functions"
source "$PLUGIN_CORE_AVAILABLE_PATH/proxy/functions"
dokku_deploy_cmd() {
local desc="deploy phase"
declare desc="deploy phase"
local cmd="deploy"
[[ -z $2 ]] && dokku_log_fail "Please specify an app to deploy"
local APP="$2"; local IMAGE_TAG="$3"; local IMAGE=$(get_app_image_name "$APP" "$IMAGE_TAG")
@@ -85,7 +85,7 @@ dokku_deploy_cmd() {
# if we can't post-deploy successfully, kill new container
kill_new() {
local desc="wrapper function to kill newly started app container"
declare desc="wrapper function to kill newly started app container"
local id="$1"
docker inspect "$id" &> /dev/null && docker stop "$id" > /dev/null && docker kill "$id" &> /dev/null
trap - INT TERM EXIT
+1 -1
View File
@@ -3,7 +3,7 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
dokku_ls_cmd() {
local desc="lists installed apps with status"
declare desc="lists installed apps with status"
local cmd="ls"
local installed_apps=$(dokku_apps)
local dokku_app
@@ -3,7 +3,7 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
dokku_receive_cmd() {
local desc="receives an app kicks off deploy process"
declare desc="receives an app kicks off deploy process"
local cmd="receive"
local APP="$2"; local IMAGE=$(get_app_image_name "$APP"); local IMAGE_SOURCE_TYPE="$3"; local TMP_WORK_DIR="$4"
if [[ -z "$DOKKU_SKIP_CLEANUP" ]]; then
@@ -4,7 +4,7 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/config/functions"
dokku_release_cmd() {
local desc="release phase"
declare desc="release phase"
local cmd="release"
local APP="$2"; local IMAGE_SOURCE_TYPE="$3"; local IMAGE_TAG="$4"; local IMAGE=$(get_app_image_name "$APP" "$IMAGE_TAG")
verify_app_name "$APP"
+1 -1
View File
@@ -3,7 +3,7 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
dokku_report_cmd() {
local desc="reports dokku vitals for troubleshooting"
declare desc="reports dokku vitals for troubleshooting"
local cmd="report"
dokku_log_info1 "uname: $(uname -a)"
+1 -1
View File
@@ -4,7 +4,7 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/config/functions"
dokku_run_cmd() {
local desc="runs command in container based on app image"
declare desc="runs command in container based on app image"
local cmd="run"
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
local APP="$2"; local IMAGE_TAG=$(get_running_image_tag "$APP"); local IMAGE=$(get_app_image_name "$APP" "$IMAGE_TAG")
+1 -1
View File
@@ -3,7 +3,7 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
dokku_trace_cmd() {
local desc="enables/disables DOKKU_TRACE"
declare desc="enables/disables DOKKU_TRACE"
local cmd="trace"
[[ -d $DOKKU_ROOT/.dokkurc ]] || mkdir -p "$DOKKU_ROOT/.dokkurc"
[[ "$2" == "on" ]] || [[ "$2" == "off" ]] || {
@@ -7,7 +7,7 @@ source "$PLUGIN_AVAILABLE_PATH/nginx-vhosts/functions"
source "$PLUGIN_CORE_AVAILABLE_PATH/proxy/functions"
dokku_version_cmd() {
local desc="prints dokku version"
declare desc="prints dokku version"
local cmd="version"
cat "$DOKKU_ROOT/VERSION" || dokku_log_fail "Unable to determine dokku's version"
}