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/config/functions"
@@ -8,7 +9,7 @@ apps_create() {
declare APP="$1"
is_valid_app_name "$APP"
apps_exists "$APP" > /dev/null 2>&1 && dokku_log_fail "Name is already taken"
apps_exists "$APP" >/dev/null 2>&1 && dokku_log_fail "Name is already taken"
mkdir -p "$DOKKU_ROOT/$APP"
dokku_log_info1_quiet "Creating $APP... done"
@@ -17,7 +18,7 @@ apps_create() {
apps_destroy() {
declare desc="destroys an app"
declare APP="$1";
declare APP="$1"
verify_app_name "$APP"
local IMAGE_TAG=$(get_running_image_tag "$APP")
@@ -54,7 +55,7 @@ apps_maybe_create() {
declare desc="creates an app dir if allowed"
declare APP="$1"
if ! apps_exists "$APP" > /dev/null 2>&1; then
if ! apps_exists "$APP" >/dev/null 2>&1; then
DOKKU_GLOBAL_DISABLE_AUTOCREATE="$(config_get --global DOKKU_DISABLE_APP_AUTOCREATION || true)"
if [[ "$DOKKU_GLOBAL_DISABLE_AUTOCREATE" == "true" ]]; then
dokku_log_warn "App auto-creation disabled."