Skip to content

Commit 2d82c26

Browse files
committed
fmt bash
1 parent 67a3afe commit 2d82c26

File tree

97 files changed

+750
-711
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+750
-711
lines changed

.editorconfig

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
insert_final_newline = true
6+
trim_trailing_whitespace = true
7+
charset = utf-8
8+
9+
[*.sh]
10+
indent_style = space
11+
indent_size = 4

build.sh

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ set -eu
33

44
ATTEMPT=${SYSTEM_TEST_BUILD_ATTEMPTS:=1}
55

6-
for (( i=1; i<=$ATTEMPT; i++ ))
7-
do
6+
for ((i = 1; i <= ATTEMPT; i++)); do
87
echo "== Run build script (attempt $i on $ATTEMPT) =="
98
if ./utils/build/build.sh "$@"; then
109
exit 0

format.sh

+27-19
Original file line numberDiff line numberDiff line change
@@ -20,55 +20,63 @@ print_usage() {
2020

2121
COMMAND=fix
2222

23-
while [[ "$#" -gt 0 ]]; do
23+
while [[ $# -gt 0 ]]; do
2424
case $1 in
25-
-c|--check) COMMAND=check ;;
26-
-h|--help) print_usage; exit 0 ;;
27-
*) echo "Invalid argument: ${1:-}"; echo; print_usage; exit 1 ;;
25+
-c | --check) COMMAND=check ;;
26+
-h | --help)
27+
print_usage
28+
exit 0
29+
;;
30+
*)
31+
echo "Invalid argument: ${1:-}"
32+
echo
33+
print_usage
34+
exit 1
35+
;;
2836
esac
2937
shift
3038
done
3139

3240
if [ ! -d "venv/" ]; then
33-
echo "Runner is not installed, installing it (ETA 60s)"
34-
./build.sh -i runner
41+
echo "Runner is not installed, installing it (ETA 60s)"
42+
./build.sh -i runner
3543
fi
3644

3745
source venv/bin/activate
3846

3947
echo "Checking Python files..."
4048
if [ "$COMMAND" == "fix" ]; then
41-
black .
49+
black .
4250
else
43-
black --check --diff .
51+
black --check --diff .
4452
fi
45-
pylint utils # pylint does not have a fix mode
53+
pylint utils # pylint does not have a fix mode
4654

4755
# not py, as it's handled by black
4856
INCLUDE_EXTENSIONS=("*.md" "*.yml" "*.yaml" "*.sh" "*.cs" "*.Dockerfile" "*.java" "*.sql" "*.ts" "*.js" "*.php")
4957
EXCLUDE_DIRS=("logs*" "*/node_modules/*" "./venv/*" "./manifests/*" "./utils/build/*")
5058

5159
INCLUDE_ARGS=()
5260
for ext in "${INCLUDE_EXTENSIONS[@]}"; do
53-
INCLUDE_ARGS+=(-name "$ext" -o)
61+
INCLUDE_ARGS+=(-name "$ext" -o)
5462
done
55-
unset 'INCLUDE_ARGS[${#INCLUDE_ARGS[@]}-1]' # remove last -o
63+
unset 'INCLUDE_ARGS[${#INCLUDE_ARGS[@]}-1]' # remove last -o
5664

5765
EXCLUDE_ARGS=()
5866
for dir in "${EXCLUDE_DIRS[@]}"; do
59-
EXCLUDE_ARGS+=(-not -path "$dir")
67+
EXCLUDE_ARGS+=(-not -path "$dir")
6068
done
6169

6270
echo "Checking tailing whitespaces..."
6371
FILES=$(find . "${EXCLUDE_ARGS[@]}" \( "${INCLUDE_ARGS[@]}" \) -exec grep -l " $" {} \;)
6472
if [ "$COMMAND" == "fix" ]; then
65-
echo "$FILES" | xargs -I {} sed -i '' -r 's/ +$//g' {}
73+
echo "$FILES" | xargs -I {} sed -i '' -r 's/ +$//g' {}
6674
else
67-
if [ -n "$FILES" ]; then
68-
echo "Some tailing white spaces has been found, please fix them 💥 💔 💥"
69-
echo "$FILES"
70-
exit 1
71-
fi
75+
if [ -n "$FILES" ]; then
76+
echo "Some tailing white spaces has been found, please fix them 💥 💔 💥"
77+
echo "$FILES"
78+
exit 1
79+
fi
7280
fi
7381

74-
echo "All good, the system-tests CI will be happy! ✨ 🍰 ✨"
82+
echo "All good, the system-tests CI will be happy! ✨ 🍰 ✨"

lib-injection/build/build_lib_injection_images.sh

+13-13
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,23 @@ export DOCKER_IMAGE_WEBLOG_TAG=latest
55
export BUILDX_PLATFORMS=linux/arm64/v8,linux/amd64
66
declare -A variants
77
variants=(["dd-lib-dotnet-init-test-app"]="dotnet"
8-
["sample-app"]="nodejs"
9-
["dd-lib-python-init-test-django"]="python"
10-
["dd-lib-python-init-test-django-gunicorn"]="python"
11-
["dd-lib-python-init-test-django-uvicorn"]="python"
12-
["dd-lib-ruby-init-test-rails"]="ruby"
13-
["dd-lib-ruby-init-test-rails-bundle-deploy"]="ruby"
14-
["dd-lib-ruby-init-test-rails-conflict"]="ruby"
15-
["dd-lib-ruby-init-test-rails-explicit"]="ruby"
16-
["dd-lib-ruby-init-test-rails-gemsrb"]="ruby"
17-
["dd-lib-java-init-test-app"]="java"
18-
)
8+
["sample-app"]="nodejs"
9+
["dd-lib-python-init-test-django"]="python"
10+
["dd-lib-python-init-test-django-gunicorn"]="python"
11+
["dd-lib-python-init-test-django-uvicorn"]="python"
12+
["dd-lib-ruby-init-test-rails"]="ruby"
13+
["dd-lib-ruby-init-test-rails-bundle-deploy"]="ruby"
14+
["dd-lib-ruby-init-test-rails-conflict"]="ruby"
15+
["dd-lib-ruby-init-test-rails-explicit"]="ruby"
16+
["dd-lib-ruby-init-test-rails-gemsrb"]="ruby"
17+
["dd-lib-java-init-test-app"]="java"
18+
)
1919
docker buildx create --name multiarch --driver docker-container --use
2020

2121
for variant in "${!variants[@]}"; do
2222
language="${variants[$variant]}"
23-
echo "Building $variant - $language";
23+
echo "Building $variant - $language"
2424
echo "$(pwd)"
2525
./lib-injection/build/build_lib_injection_weblog.sh -w $variant -l $language --push-tag ghcr.io/datadog/system-tests/$variant:$DOCKER_IMAGE_WEBLOG_TAG
2626

27-
done
27+
done

lib-injection/build/build_lib_injection_weblog.sh

+34-16
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ set -e
44
readonly SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
55
echo "SCRIPT_DIR: $SCRIPT_DIR"
66

7-
87
print_usage() {
98
echo -e "${WHITE_BOLD}DESCRIPTION${NC}"
109
echo -e " Builds Docker images for weblog variants with tracers extracted from lib injection init images."
@@ -22,15 +21,35 @@ print_usage() {
2221
echo -e ""
2322
}
2423

25-
while [[ "$#" -gt 0 ]]; do
24+
while [[ $# -gt 0 ]]; do
2625
case $1 in
27-
cpp|dotnet|golang|java|java_otel|nodejs|nodejs_otel|php|python|python_otel|ruby) TEST_LIBRARY="$1";;
28-
-l|--library) TEST_LIBRARY="$2"; shift ;;
29-
-w|--weblog-variant) WEBLOG_VARIANT="$2"; shift ;;
30-
-dp|--docker-platform) DOCKER_PLATFORM="--platform $2"; shift ;;
31-
-pt|--push-tag) PUSH_TAG="$2"; shift ;;
32-
-h|--help) print_usage; exit 0 ;;
33-
*) echo "Invalid argument: ${1:-}"; echo; print_usage; exit 1 ;;
26+
cpp | dotnet | golang | java | java_otel | nodejs | nodejs_otel | php | python | python_otel | ruby) TEST_LIBRARY="$1" ;;
27+
-l | --library)
28+
TEST_LIBRARY="$2"
29+
shift
30+
;;
31+
-w | --weblog-variant)
32+
WEBLOG_VARIANT="$2"
33+
shift
34+
;;
35+
-dp | --docker-platform)
36+
DOCKER_PLATFORM="--platform $2"
37+
shift
38+
;;
39+
-pt | --push-tag)
40+
PUSH_TAG="$2"
41+
shift
42+
;;
43+
-h | --help)
44+
print_usage
45+
exit 0
46+
;;
47+
*)
48+
echo "Invalid argument: ${1:-}"
49+
echo
50+
print_usage
51+
exit 1
52+
;;
3453
esac
3554
shift
3655
done
@@ -43,7 +62,7 @@ fi
4362

4463
WEBLOG_FOLDER="${SCRIPT_DIR}/docker/${TEST_LIBRARY}/${WEBLOG_VARIANT}"
4564

46-
if [[ (! -f "${WEBLOG_FOLDER}/Dockerfile") ]]; then
65+
if [[ ! -f "${WEBLOG_FOLDER}/Dockerfile" ]]; then
4766
echo "Variant [${WEBLOG_VARIANT}] for library [${TEST_LIBRARY}] not found or WEBLOG_VARIANT is not set"
4867
print_usage
4968
exit 1
@@ -57,19 +76,18 @@ fi
5776
ARCH=$(uname -m | sed 's/x86_//;s/i[3-6]86/32/')
5877

5978
case $ARCH in
60-
arm64|aarch64) DOCKER_PLATFORM_ARGS="${DOCKER_PLATFORM:-"--platform linux/arm64/v8"}";;
61-
*) DOCKER_PLATFORM_ARGS="${DOCKER_PLATFORM:-"--platform linux/amd64"}";;
79+
arm64 | aarch64) DOCKER_PLATFORM_ARGS="${DOCKER_PLATFORM:-"--platform linux/arm64/v8"}" ;;
80+
*) DOCKER_PLATFORM_ARGS="${DOCKER_PLATFORM:-"--platform linux/amd64"}" ;;
6281
esac
6382

64-
6583
echo "Building docker weblog image using variant [${WEBLOG_VARIANT}] and library [${TEST_LIBRARY}]"
6684
CURRENT_DIR=$(pwd)
6785
cd $WEBLOG_FOLDER
6886

6987
if [ -n "${PUSH_TAG+set}" ]; then
70-
echo $GH_TOKEN | docker login ghcr.io -u publisher --password-stdin
71-
docker buildx build ${DOCKER_PLATFORM} -t ${PUSH_TAG} . --push
88+
echo $GH_TOKEN | docker login ghcr.io -u publisher --password-stdin
89+
docker buildx build ${DOCKER_PLATFORM} -t ${PUSH_TAG} . --push
7290
else
7391
docker build ${DOCKER_PLATFORM} -t weblog-injection:latest .
7492
fi
75-
cd $CURRENT_DIR
93+
cd $CURRENT_DIR
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/bin/bash
22

3-
if [ -z "${BUILDX_PLATFORMS}" ] ; then
3+
if [ -z "${BUILDX_PLATFORMS}" ]; then
44
BUILDX_PLATFORMS="linux/amd64"
55
fi
6-
if [ -z "${RUNTIME}" ] ; then
6+
if [ -z "${RUNTIME}" ]; then
77
RUNTIME="bullseye-slim"
88
fi
9-
docker buildx build --build-arg RUNTIME=${RUNTIME} --platform ${BUILDX_PLATFORMS} --tag ${LIBRARY_INJECTION_TEST_APP_IMAGE} --push .
9+
docker buildx build --build-arg RUNTIME=${RUNTIME} --platform ${BUILDX_PLATFORMS} --tag ${LIBRARY_INJECTION_TEST_APP_IMAGE} --push .

lib-injection/build/docker/dotnet/install_ddtrace.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ if [ -e "dd-trace-dotnet" ]; then
1111
echo "Install from local folder ${BINARIES_DIR}/dd-trace-dotnet"
1212
fi
1313

14-
cd $current_dir
14+
cd $current_dir
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/bash
22

33
./gradlew -PdockerImageRepo=${APP_DOCKER_IMAGE_REPO} -PdockerImageTag=${DOCKER_IMAGE_WEBLOG_TAG} clean bootBuildImage
4-
docker push ${APP_DOCKER_IMAGE_REPO}:${DOCKER_IMAGE_WEBLOG_TAG}
4+
docker push ${APP_DOCKER_IMAGE_REPO}:${DOCKER_IMAGE_WEBLOG_TAG}

lib-injection/build/docker/java/install_ddtrace.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ BINARIES_DIR=$1 #/binaries
77
if [ $(ls $BINARIES_DIR/dd-java-agent*.jar | wc -l) = 0 ]; then
88
BUILD_URL="https://github.com/DataDog/dd-trace-java/releases/latest/download/dd-java-agent.jar"
99
echo "install from Github release: $BUILD_URL"
10-
curl -Lf -o $BINARIES_DIR/dd-java-agent.jar $BUILD_URL
10+
curl -Lf -o $BINARIES_DIR/dd-java-agent.jar $BUILD_URL
1111

1212
elif [ $(ls $BINARIES_DIR/dd-java-agent*.jar | wc -l) = 1 ]; then
1313
echo "Install local file $(ls $BINARIES_DIR/dd-java-agent*.jar)"
@@ -17,6 +17,6 @@ else
1717
exit 1
1818
fi
1919

20-
java -jar $BINARIES_DIR/dd-java-agent.jar > $BINARIES_DIR/SYSTEM_TESTS_LIBRARY_VERSION
20+
java -jar $BINARIES_DIR/dd-java-agent.jar >$BINARIES_DIR/SYSTEM_TESTS_LIBRARY_VERSION
2121

22-
echo "Installed $(cat $BINARIES_DIR/SYSTEM_TESTS_LIBRARY_VERSION) java library"
22+
echo "Installed $(cat $BINARIES_DIR/SYSTEM_TESTS_LIBRARY_VERSION) java library"

lib-injection/build/docker/nodejs/install_ddtrace.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ if [ -e "dd-trace-js" ]; then
1515
mv dd-trace-*.tgz ../dd-trace.tgz
1616
fi
1717

18-
cd $current_dir
18+
cd $current_dir
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

3-
if [ -z "${BUILDX_PLATFORMS}" ] ; then
4-
BUILDX_PLATFORMS=`docker buildx imagetools inspect --raw python:3.9 | jq -r 'reduce (.manifests[] | [ .platform.os, .platform.architecture, .platform.variant ] | join("/") | sub("\\/$"; "")) as $item (""; . + "," + $item)' | sed 's/,//'`
3+
if [ -z "${BUILDX_PLATFORMS}" ]; then
4+
BUILDX_PLATFORMS=$(docker buildx imagetools inspect --raw python:3.9 | jq -r 'reduce (.manifests[] | [ .platform.os, .platform.architecture, .platform.variant ] | join("/") | sub("\/$"; "")) as $item (""; . + "," + $item)' | sed 's/,//')
55
fi
66
echo "Build for platforms: ${BUILDX_PLATFORMS}"
7-
docker buildx build --platform ${BUILDX_PLATFORMS} --tag ${LIBRARY_INJECTION_TEST_APP_IMAGE} --push .
7+
docker buildx build --platform ${BUILDX_PLATFORMS} --tag ${LIBRARY_INJECTION_TEST_APP_IMAGE} --push .
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
if [ -z "${BUILDX_PLATFORMS}" ] ; then
4-
BUILDX_PLATFORMS=`docker buildx imagetools inspect --raw python:3.9 | jq -r 'reduce (.manifests[] | [ .platform.os, .platform.architecture, .platform.variant ] | join("/") | sub("\\/$"; "")) as $item (""; . + "," + $item)' | sed 's/,//'`
3+
if [ -z "${BUILDX_PLATFORMS}" ]; then
4+
BUILDX_PLATFORMS=$(docker buildx imagetools inspect --raw python:3.9 | jq -r 'reduce (.manifests[] | [ .platform.os, .platform.architecture, .platform.variant ] | join("/") | sub("\/$"; "")) as $item (""; . + "," + $item)' | sed 's/,//')
55
fi
6-
docker buildx build --platform ${BUILDX_PLATFORMS} --tag ${LIBRARY_INJECTION_TEST_APP_IMAGE} --push .
6+
docker buildx build --platform ${BUILDX_PLATFORMS} --tag ${LIBRARY_INJECTION_TEST_APP_IMAGE} --push .
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
if [ -z "${BUILDX_PLATFORMS}" ] ; then
4-
BUILDX_PLATFORMS=`docker buildx imagetools inspect --raw python:3.9 | jq -r 'reduce (.manifests[] | [ .platform.os, .platform.architecture, .platform.variant ] | join("/") | sub("\\/$"; "")) as $item (""; . + "," + $item)' | sed 's/,//'`
3+
if [ -z "${BUILDX_PLATFORMS}" ]; then
4+
BUILDX_PLATFORMS=$(docker buildx imagetools inspect --raw python:3.9 | jq -r 'reduce (.manifests[] | [ .platform.os, .platform.architecture, .platform.variant ] | join("/") | sub("\/$"; "")) as $item (""; . + "," + $item)' | sed 's/,//')
55
fi
6-
docker buildx build --platform ${BUILDX_PLATFORMS} --tag ${LIBRARY_INJECTION_TEST_APP_IMAGE} --push .
6+
docker buildx build --platform ${BUILDX_PLATFORMS} --tag ${LIBRARY_INJECTION_TEST_APP_IMAGE} --push .
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
if [ -z "${BUILDX_PLATFORMS}" ] ; then
4-
BUILDX_PLATFORMS=`docker buildx imagetools inspect --raw python:3.9 | jq -r 'reduce (.manifests[] | [ .platform.os, .platform.architecture, .platform.variant ] | join("/") | sub("\\/$"; "")) as $item (""; . + "," + $item)' | sed 's/,//'`
3+
if [ -z "${BUILDX_PLATFORMS}" ]; then
4+
BUILDX_PLATFORMS=$(docker buildx imagetools inspect --raw python:3.9 | jq -r 'reduce (.manifests[] | [ .platform.os, .platform.architecture, .platform.variant ] | join("/") | sub("\/$"; "")) as $item (""; . + "," + $item)' | sed 's/,//')
55
fi
6-
docker buildx build --platform ${BUILDX_PLATFORMS} --tag ${LIBRARY_INJECTION_TEST_APP_IMAGE} --push .
6+
docker buildx build --platform ${BUILDX_PLATFORMS} --tag ${LIBRARY_INJECTION_TEST_APP_IMAGE} --push .

lib-injection/build/docker/python/install_ddtrace.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ if [ -e "dd-trace-py" ]; then
1111
echo "Install from local folder ${BINARIES_DIR}/dd-trace-py"
1212
fi
1313

14-
cd $current_dir
14+
cd $current_dir

lib-injection/build/docker/ruby/dd-lib-ruby-init-test-rails-bundle-deploy/build.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

3-
if [ -z "${BUILDX_PLATFORMS}" ] ; then
4-
BUILDX_PLATFORMS=`docker buildx imagetools inspect --raw ruby:3.1 | jq -r 'reduce (.manifests[] | [ .platform.os, .platform.architecture, .platform.variant ] | join("/") | sub("\\/$"; "")) as $item (""; . + "," + $item)' | sed 's/,//'`
3+
if [ -z "${BUILDX_PLATFORMS}" ]; then
4+
BUILDX_PLATFORMS=$(docker buildx imagetools inspect --raw ruby:3.1 | jq -r 'reduce (.manifests[] | [ .platform.os, .platform.architecture, .platform.variant ] | join("/") | sub("\/$"; "")) as $item (""; . + "," + $item)' | sed 's/,//')
55
fi
66

77
cp -r ../lib_injection_rails_app .

lib-injection/build/docker/ruby/dd-lib-ruby-init-test-rails-conflict/build.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

3-
if [ -z "${BUILDX_PLATFORMS}" ] ; then
4-
BUILDX_PLATFORMS=`docker buildx imagetools inspect --raw ruby:3.1 | jq -r 'reduce (.manifests[] | [ .platform.os, .platform.architecture, .platform.variant ] | join("/") | sub("\\/$"; "")) as $item (""; . + "," + $item)' | sed 's/,//'`
3+
if [ -z "${BUILDX_PLATFORMS}" ]; then
4+
BUILDX_PLATFORMS=$(docker buildx imagetools inspect --raw ruby:3.1 | jq -r 'reduce (.manifests[] | [ .platform.os, .platform.architecture, .platform.variant ] | join("/") | sub("\/$"; "")) as $item (""; . + "," + $item)' | sed 's/,//')
55
fi
66

77
cp -r ../lib_injection_rails_app .

lib-injection/build/docker/ruby/dd-lib-ruby-init-test-rails-explicit/build.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

3-
if [ -z "${BUILDX_PLATFORMS}" ] ; then
4-
BUILDX_PLATFORMS=`docker buildx imagetools inspect --raw ruby:3.1 | jq -r 'reduce (.manifests[] | [ .platform.os, .platform.architecture, .platform.variant ] | join("/") | sub("\\/$"; "")) as $item (""; . + "," + $item)' | sed 's/,//'`
3+
if [ -z "${BUILDX_PLATFORMS}" ]; then
4+
BUILDX_PLATFORMS=$(docker buildx imagetools inspect --raw ruby:3.1 | jq -r 'reduce (.manifests[] | [ .platform.os, .platform.architecture, .platform.variant ] | join("/") | sub("\/$"; "")) as $item (""; . + "," + $item)' | sed 's/,//')
55
fi
66

77
cp -r ../lib_injection_rails_app .

lib-injection/build/docker/ruby/dd-lib-ruby-init-test-rails-gemsrb/build.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

3-
if [ -z "${BUILDX_PLATFORMS}" ] ; then
4-
BUILDX_PLATFORMS=`docker buildx imagetools inspect --raw ruby:3.1 | jq -r 'reduce (.manifests[] | [ .platform.os, .platform.architecture, .platform.variant ] | join("/") | sub("\\/$"; "")) as $item (""; . + "," + $item)' | sed 's/,//'`
3+
if [ -z "${BUILDX_PLATFORMS}" ]; then
4+
BUILDX_PLATFORMS=$(docker buildx imagetools inspect --raw ruby:3.1 | jq -r 'reduce (.manifests[] | [ .platform.os, .platform.architecture, .platform.variant ] | join("/") | sub("\/$"; "")) as $item (""; . + "," + $item)' | sed 's/,//')
55
fi
66

77
cp -r ../lib_injection_rails_app .

lib-injection/build/docker/ruby/dd-lib-ruby-init-test-rails/build.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

3-
if [ -z "${BUILDX_PLATFORMS}" ] ; then
4-
BUILDX_PLATFORMS=`docker buildx imagetools inspect --raw ruby:3.1 | jq -r 'reduce (.manifests[] | [ .platform.os, .platform.architecture, .platform.variant ] | join("/") | sub("\\/$"; "")) as $item (""; . + "," + $item)' | sed 's/,//'`
3+
if [ -z "${BUILDX_PLATFORMS}" ]; then
4+
BUILDX_PLATFORMS=$(docker buildx imagetools inspect --raw ruby:3.1 | jq -r 'reduce (.manifests[] | [ .platform.os, .platform.architecture, .platform.variant ] | join("/") | sub("\/$"; "")) as $item (""; . + "," + $item)' | sed 's/,//')
55
fi
66

77
cp -r ../lib_injection_rails_app .

lib-injection/execFunction.sh

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ export BASE_DIR=$(dirname "${SCRIPT_PATH}")
77

88
source ${BASE_DIR}/src/test/shell/functions.sh
99

10-
for func in "${@}"
11-
do
10+
for func in "${@}"; do
1211
echo "**************************"
1312
echo "* Running ${func} *"
1413
echo "**************************"

0 commit comments

Comments
 (0)