Shellcheck: SC2046 and SC2086 quoting
This commit is contained in:
parent
359ba16fe0
commit
d2d0efe69c
|
@ -11,7 +11,7 @@ array_6_11='6 boron';
|
|||
# shellcheck disable=SC2034
|
||||
array_8_1='8 latest';
|
||||
|
||||
cd $(cd ${0%/*} && pwd -P);
|
||||
cd "$(cd "${0%/*}" && pwd -P)";
|
||||
|
||||
self="$(basename "$BASH_SOURCE")"
|
||||
|
||||
|
@ -44,7 +44,7 @@ for version in "${versions[@]}"; do
|
|||
# Skip "docs" and other non-docker directories
|
||||
[ -f "$version/Dockerfile" ] || continue
|
||||
|
||||
eval stub=$(echo "$version" | awk -F. '{ print "$array_" $1 "_" $2 }');
|
||||
eval stub="$(echo "$version" | awk -F. '{ print "$array_" $1 "_" $2 }')";
|
||||
commit="$(fileCommit "$version")"
|
||||
fullVersion="$(grep -m1 'ENV NODE_VERSION ' "$version/Dockerfile" | cut -d' ' -f3)"
|
||||
|
||||
|
@ -55,7 +55,7 @@ for version in "${versions[@]}"; do
|
|||
echo "Directory: ${version}"
|
||||
echo
|
||||
|
||||
variants=$(echo $version/*/ | xargs -n1 basename)
|
||||
variants=$(echo "$version"/*/ | xargs -n1 basename)
|
||||
for variant in $variants; do
|
||||
# Skip non-docker directories
|
||||
[ -f "$version/$variant/Dockerfile" ] || continue
|
||||
|
|
|
@ -16,7 +16,7 @@ fatal() {
|
|||
exit 1
|
||||
}
|
||||
|
||||
cd $(cd ${0%/*} && pwd -P);
|
||||
cd "$(cd "${0%/*}" && pwd -P)";
|
||||
|
||||
versions=( "$@" )
|
||||
if [ ${#versions[@]} -eq 0 ]; then
|
||||
|
@ -28,38 +28,38 @@ for version in "${versions[@]}"; do
|
|||
# Skip "docs" and other non-docker directories
|
||||
[ -f "$version/Dockerfile" ] || continue
|
||||
|
||||
tag=$(cat $version/Dockerfile | grep "ENV NODE_VERSION" | cut -d' ' -f3)
|
||||
tag=$(cat "$version/Dockerfile" | grep "ENV NODE_VERSION" | cut -d' ' -f3)
|
||||
|
||||
info "Building $tag..."
|
||||
|
||||
if ! docker build -t node:$tag $version; then
|
||||
if ! docker build -t node:"$tag" "$version"; then
|
||||
fatal "Build of $tag failed!"
|
||||
else
|
||||
info "Build of $tag succeeded."
|
||||
fi
|
||||
|
||||
OUTPUT=$(docker run --rm -it node:$tag node -e "process.stdout.write(process.versions.node)")
|
||||
OUTPUT=$(docker run --rm -it node:"$tag" node -e "process.stdout.write(process.versions.node)")
|
||||
if [ "$OUTPUT" != "$tag" ]; then
|
||||
fatal "Test of $tag failed!"
|
||||
else
|
||||
info "Test of $tag succeeded."
|
||||
fi
|
||||
|
||||
variants=$(echo $version/*/ | xargs -n1 basename)
|
||||
variants=$(echo "$version"/*/ | xargs -n1 basename)
|
||||
|
||||
for variant in $variants; do
|
||||
# Skip non-docker directories
|
||||
[ -f "$version/$variant/Dockerfile" ] || continue
|
||||
|
||||
|
||||
info "Building $tag-$variant variant..."
|
||||
|
||||
if ! docker build -t node:$tag-$variant $version/$variant; then
|
||||
if ! docker build -t node:"$tag-$variant" "$version/$variant"; then
|
||||
fatal "Build of $tag-$variant failed!"
|
||||
else
|
||||
info "Build of $tag-$variant succeeded."
|
||||
fi
|
||||
|
||||
OUTPUT=$(docker run --rm -it node:$tag-$variant node -e "process.stdout.write(process.versions.node)")
|
||||
OUTPUT=$(docker run --rm -it node:"$tag-$variant" node -e "process.stdout.write(process.versions.node)")
|
||||
if [ "$OUTPUT" != "$tag" ]; then
|
||||
fatal "Test of $tag-$variant failed!"
|
||||
else
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
cd $(cd ${0%/*} && pwd -P);
|
||||
cd "$(cd "${0%/*}" && pwd -P)";
|
||||
|
||||
versions=( "$@" )
|
||||
if [ ${#versions[@]} -eq 0 ]; then
|
||||
|
@ -39,7 +39,7 @@ for version in "${versions[@]}"; do
|
|||
|
||||
update_node_version
|
||||
|
||||
variants=$(echo $version/*/ | xargs -n1 basename)
|
||||
variants=$(echo "$version"/*/ | xargs -n1 basename)
|
||||
|
||||
for variant in $variants; do
|
||||
# Skip non-docker directories
|
||||
|
|
Loading…
Reference in New Issue