Browse code

hack: fix mixed tabs/spaces for indentation

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 2cffe9be3d423f2256b4edba50921123363d4b99)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Sebastiaan van Stijn authored on 2019/08/02 22:58:33
Showing 10 changed files
... ...
@@ -2,26 +2,26 @@
2 2
 set -eu
3 3
 
4 4
 swagger generate model -f api/swagger.yaml \
5
-    -t api -m types --skip-validator -C api/swagger-gen.yaml \
6
-    -n ErrorResponse \
7
-    -n GraphDriverData \
8
-    -n IdResponse \
9
-    -n ImageDeleteResponseItem \
10
-    -n ImageSummary \
11
-    -n Plugin -n PluginDevice -n PluginMount -n PluginEnv -n PluginInterfaceType \
12
-    -n Port \
13
-    -n ServiceUpdateResponse \
14
-    -n Volume
5
+	-t api -m types --skip-validator -C api/swagger-gen.yaml \
6
+	-n ErrorResponse \
7
+	-n GraphDriverData \
8
+	-n IdResponse \
9
+	-n ImageDeleteResponseItem \
10
+	-n ImageSummary \
11
+	-n Plugin -n PluginDevice -n PluginMount -n PluginEnv -n PluginInterfaceType \
12
+	-n Port \
13
+	-n ServiceUpdateResponse \
14
+	-n Volume
15 15
 
16 16
 swagger generate operation -f api/swagger.yaml \
17
-    -t api -a types -m types -C api/swagger-gen.yaml \
18
-    -T api/templates --skip-responses --skip-parameters --skip-validator \
19
-    -n Authenticate \
20
-    -n ContainerChanges \
21
-    -n ContainerCreate \
22
-    -n ContainerTop \
23
-    -n ContainerUpdate \
24
-    -n ContainerWait \
25
-    -n ImageHistory \
26
-    -n VolumeCreate \
27
-    -n VolumeList
17
+	-t api -a types -m types -C api/swagger-gen.yaml \
18
+	-T api/templates --skip-responses --skip-parameters --skip-validator \
19
+	-n Authenticate \
20
+	-n ContainerChanges \
21
+	-n ContainerCreate \
22
+	-n ContainerTop \
23
+	-n ContainerUpdate \
24
+	-n ContainerWait \
25
+	-n ImageHistory \
26
+	-n VolumeCreate \
27
+	-n VolumeList
... ...
@@ -20,7 +20,7 @@ fi
20 20
 # This is a temporary hack for split-binary mode. It can be removed once
21 21
 # https://github.com/docker/docker/pull/22134 is merged into docker master
22 22
 if [ "$(go env GOOS)" = 'windows' ]; then
23
-       return
23
+	return
24 24
 fi
25 25
 
26 26
 if [ -z "$DOCKER_TEST_HOST" ]; then
... ...
@@ -3,8 +3,7 @@ set -e
3 3
 
4 4
 # This script exists as backwards compatibility for CI
5 5
 (
6
-
7
-    DEST="${DEST}-daemon"
8
-    ABS_DEST="${ABS_DEST}-daemon"
9
-    . hack/make/dynbinary-daemon
6
+	DEST="${DEST}-daemon"
7
+	ABS_DEST="${ABS_DEST}-daemon"
8
+	. hack/make/dynbinary-daemon
10 9
 )
... ...
@@ -3,13 +3,13 @@ set -e -o pipefail
3 3
 
4 4
 source hack/validate/.validate
5 5
 new_tests=$(
6
-    validate_diff --diff-filter=ACMR --unified=0 -- 'integration/*_test.go' |
7
-    grep -E '^(\+func )(.*)(\*testing)' || true
6
+	validate_diff --diff-filter=ACMR --unified=0 -- 'integration/*_test.go' |
7
+	grep -E '^(\+func )(.*)(\*testing)' || true
8 8
 )
9 9
 
10 10
 if [ -z "$new_tests" ]; then
11
-    echo 'No new tests added to integration.'
12
-    return
11
+	echo 'No new tests added to integration.'
12
+	return
13 13
 fi
14 14
 
15 15
 echo
... ...
@@ -18,12 +18,12 @@ echo "$new_tests"
18 18
 echo "Running stress test for them."
19 19
 
20 20
 (
21
-    TESTARRAY=$(echo "$new_tests" | sed 's/+func //' | awk -F'\\(' '{print $1}' | tr '\n' '|')
22
-    # Note: TEST_REPEAT will make the test suite run 5 times, restarting the daemon
23
-    # and each test will run 5 times in a row under the same daemon.
24
-    # This will make a total of 25 runs for each test in TESTARRAY.
25
-    export TEST_REPEAT=5
26
-    export TESTFLAGS="-test.count ${TEST_REPEAT} -test.run ${TESTARRAY%?}"
27
-    echo "Using test flags: $TESTFLAGS"
28
-    source hack/make/test-integration
21
+	TESTARRAY=$(echo "$new_tests" | sed 's/+func //' | awk -F'\\(' '{print $1}' | tr '\n' '|')
22
+	# Note: TEST_REPEAT will make the test suite run 5 times, restarting the daemon
23
+	# and each test will run 5 times in a row under the same daemon.
24
+	# This will make a total of 25 runs for each test in TESTARRAY.
25
+	export TEST_REPEAT=5
26
+	export TESTFLAGS="-test.count ${TEST_REPEAT} -test.run ${TESTARRAY%?}"
27
+	echo "Using test flags: $TESTFLAGS"
28
+	source hack/make/test-integration
29 29
 )
... ...
@@ -20,9 +20,9 @@ pkg_list=$(go list $TESTDIRS | grep -vE "($exclude_paths)")
20 20
 
21 21
 mkdir -p bundles
22 22
 gotestsum --format=standard-quiet --jsonfile=bundles/go-test-report.json --junitfile=bundles/junit-report.xml -- \
23
-  "${BUILDFLAGS[@]}" \
24
-  -cover \
25
-  -coverprofile=bundles/profile.out \
26
-  -covermode=atomic \
27
-  ${TESTFLAGS} \
28
-  ${pkg_list}
23
+	"${BUILDFLAGS[@]}" \
24
+	-cover \
25
+	-coverprofile=bundles/profile.out \
26
+	-covermode=atomic \
27
+	${TESTFLAGS} \
28
+	${pkg_list}
... ...
@@ -3,8 +3,8 @@
3 3
 changelogFile=${1:-CHANGELOG.md}
4 4
 
5 5
 if [ ! -r "$changelogFile" ]; then
6
-  echo "Unable to read file $changelogFile" >&2
7
-  exit 1
6
+	echo "Unable to read file $changelogFile" >&2
7
+	exit 1
8 8
 fi
9 9
 
10 10
 grep -e '^## ' "$changelogFile" | awk '{print$3}' | sort -c -r || exit 2
... ...
@@ -3,8 +3,8 @@
3 3
 changelogFile=${1:-CHANGELOG.md}
4 4
 
5 5
 if [ ! -r "$changelogFile" ]; then
6
-  echo "Unable to read file $changelogFile" >&2
7
-  exit 1
6
+	echo "Unable to read file $changelogFile" >&2
7
+	exit 1
8 8
 fi
9 9
 
10 10
 changelogWellFormed=1
... ...
@@ -12,14 +12,14 @@ changelogWellFormed=1
12 12
 # e.g. "## 1.12.3 (2016-10-26)"
13 13
 VER_LINE_REGEX='^## [0-9]+\.[0-9]+\.[0-9]+(-ce)? \([0-9]+-[0-9]+-[0-9]+\)$'
14 14
 while read -r line; do
15
-  if ! [[ "$line" =~ $VER_LINE_REGEX ]]; then
16
-    echo "Malformed changelog $changelogFile line \"$line\"" >&2
17
-    changelogWellFormed=0
18
-  fi
15
+	if ! [[ "$line" =~ $VER_LINE_REGEX ]]; then
16
+		echo "Malformed changelog $changelogFile line \"$line\"" >&2
17
+		changelogWellFormed=0
18
+	fi
19 19
 done < <(grep '^## ' $changelogFile)
20 20
 
21 21
 if [[ "$changelogWellFormed" == "1" ]]; then
22
-  echo "Congratulations!  Changelog $changelogFile is well-formed."
22
+	echo "Congratulations!  Changelog $changelogFile is well-formed."
23 23
 else
24
-  exit 2
24
+	exit 2
25 25
 fi
... ...
@@ -5,13 +5,13 @@ export SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
5 5
 source "${SCRIPTDIR}/.validate"
6 6
 
7 7
 new_tests=$(
8
-    validate_diff --diff-filter=ACMR --unified=0 -- 'integration-cli/*_cli_*.go' |
9
-    grep -E '^\+func (.*) Test' || true
8
+	validate_diff --diff-filter=ACMR --unified=0 -- 'integration-cli/*_cli_*.go' |
9
+	grep -E '^\+func (.*) Test' || true
10 10
 )
11 11
 
12 12
 if [ -z "$new_tests" ]; then
13 13
 	echo 'Congratulations!  No new tests added to integration-cli.'
14
-    exit
14
+	exit
15 15
 fi
16 16
 
17 17
 echo "The following new tests were added to integration-cli:"
... ...
@@ -8,6 +8,6 @@ files=( $(validate_diff --diff-filter=ACMR --name-only -- 'api/swagger.yaml' ||
8 8
 unset IFS
9 9
 
10 10
 if [ ${#files[@]} -gt 0 ]; then
11
-  yamllint -c ${SCRIPTDIR}/.swagger-yamllint api/swagger.yaml
12
-  swagger validate api/swagger.yaml
11
+	yamllint -c ${SCRIPTDIR}/.swagger-yamllint api/swagger.yaml
12
+	swagger validate api/swagger.yaml
13 13
 fi
... ...
@@ -25,5 +25,5 @@ if [ ${#files[@]} -gt 0 ]; then
25 25
 		echo 'Congratulations! All api changes are done the right way.'
26 26
 	fi
27 27
 else
28
-    echo 'No api/types/ or api/swagger.yaml changes in diff.'
28
+	echo 'No api/types/ or api/swagger.yaml changes in diff.'
29 29
 fi