tests: run mvdan/shfmt on test runs

While I do not agree with _every_ style change, this will force Dokku to have consistent formatting across all shell scripts, which is arguably a Good Thing™.

The command used to reprocess everything is:

```shell
shfmt -l -bn -ci -i 2 -w .
```
This commit is contained in:
Jose Diaz-Gonzalez
2019-01-07 01:04:17 -05:00
parent fb7c73a7e3
commit 86795ddacc
283 changed files with 1536 additions and 1018 deletions

View File

@@ -1,5 +1,6 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/proxy/functions"

View File

@@ -1,5 +1,6 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/config/functions"
source "$PLUGIN_AVAILABLE_PATH/proxy/functions"
@@ -8,7 +9,8 @@ proxy_disable_cmd() {
declare desc="disable proxy for app via command line"
local cmd="proxy:disable"
[[ -z $1 ]] && dokku_log_fail "Please specify an app to run the command on"
local APP="$1"; verify_app_name "$APP"
local APP="$1"
verify_app_name "$APP"
if [[ "$(is_app_proxy_enabled "$APP")" == "true" ]]; then
dokku_log_info1 "Disabling proxy for app ($APP)"

View File

@@ -1,5 +1,6 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/config/functions"
source "$PLUGIN_AVAILABLE_PATH/proxy/functions"
@@ -8,7 +9,8 @@ proxy_enable_cmd() {
declare desc="enable proxy for app via command line"
local cmd="proxy:enable"
[[ -z $1 ]] && dokku_log_fail "Please specify an app to run the command on"
local APP="$1"; verify_app_name "$APP"
local APP="$1"
verify_app_name "$APP"
if [[ "$(is_app_proxy_enabled "$APP")" == "false" ]]; then
dokku_log_info1 "Enabling proxy for app ($APP)"

View File

@@ -1,5 +1,6 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/proxy/functions"
source "$PLUGIN_AVAILABLE_PATH/config/functions"
@@ -7,7 +8,8 @@ source "$PLUGIN_AVAILABLE_PATH/config/functions"
proxy_ports_cmd() {
declare desc="cmd wrapper to list proxy port mappings for an app"
local cmd="proxy:ports"
local APP="$2"; verify_app_name "$APP"
local APP="$2"
verify_app_name "$APP"
list_app_proxy_ports "$APP"
}

View File

@@ -1,12 +1,14 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/proxy/functions"
proxy_ports_add_cmd() {
declare desc="add proxy port mappings from an app"
local cmd="proxy:add"
local APP="$2"; verify_app_name "$APP"
local APP="$2"
verify_app_name "$APP"
shift 2
add_proxy_ports "$APP" "$@"

View File

@@ -1,12 +1,14 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/config/functions"
proxy_ports_clear_cmd() {
declare desc="clear all proxy port mappings for an app"
local cmd="proxy:clear"
local APP="$2"; verify_app_name "$APP"
local APP="$2"
verify_app_name "$APP"
config_unset --no-restart "$APP" DOKKU_PROXY_PORT_MAP
plugn trigger post-proxy-ports-update "$APP" "clear"

View File

@@ -1,12 +1,14 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/proxy/functions"
proxy_ports_remove_cmd() {
declare desc="remove specific proxy port mappings from an app"
local cmd="proxy:ports-remove"
local APP="$2"; verify_app_name "$APP"
local APP="$2"
verify_app_name "$APP"
shift 2
local INPUT_PORTS="$*"

View File

@@ -1,12 +1,14 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/proxy/functions"
proxy_ports_set_cmd() {
declare desc="add proxy port mappings from an app"
local cmd="proxy:add"
local APP="$2"; verify_app_name "$APP"
local APP="$2"
verify_app_name "$APP"
shift 2
set_proxy_ports "$APP" "$@"

View File

@@ -1,5 +1,6 @@
#!/usr/bin/env bash
source "$PLUGIN_AVAILABLE_PATH/proxy/internal-functions"
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
cmd-proxy-report "$@"

View File

@@ -1,5 +1,6 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/config/functions"
@@ -8,7 +9,8 @@ proxy_set_cmd() {
local cmd="proxy:set"
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
local APP="$2"; verify_app_name "$APP"
local APP="$2"
verify_app_name "$APP"
local PROXY_TYPE="$3"
if [[ -n "$PROXY_TYPE" ]]; then