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,7 +1,11 @@
#!/usr/bin/env bash
set -xeo pipefail
SELF=$(which "$0"); APP="$1"; TARGET="$2"; FORWARDED_PORT="$3"; SHOULD_FAIL="$4"
SELF=$(which "$0")
APP="$1"
TARGET="$2"
FORWARDED_PORT="$3"
SHOULD_FAIL="$4"
REMOTE="dokku@$TARGET"
REPO="test-$(basename "$APP")-$RANDOM"
@@ -25,7 +29,7 @@ succeeded() {
TMP=$(mktemp -d "/tmp/$TARGET.XXXXX")
rmdir "$TMP" && cp -r "$(dirname "$SELF")/$APP" "$TMP"
pushd "$TMP" &> /dev/null || exit 1
pushd "$TMP" &>/dev/null || exit 1
trap 'popd &> /dev/null || true; rm -rf "$TMP"' INT TERM EXIT
git init