Chore: Fix bashate warnings 67/70467/2
authorAnil Belur <abelur@linuxfoundation.org>
Tue, 9 Aug 2022 07:22:42 +0000 (17:22 +1000)
committerAnil Belur <abelur@linuxfoundation.org>
Sat, 20 Aug 2022 02:02:33 +0000 (12:02 +1000)
./shell/autotools-sonarqube.sh:59:1: E006 Line too long
./shell/check-info-votes.sh:45:1: E006 Line too long
./shell/check-info-votes.sh:54:1: E006 Line too long
./shell/check-info-votes.sh:56:1: E006 Line too long
./shell/cmake-sonar.sh:25:1: E006 Line too long
./shell/cmake-sonar.sh:31:1: E006 Line too long
./shell/cmake-sonar.sh:49:1: E006 Line too long
./shell/cmake-sonarqube.sh:31:1: E006 Line too long
./shell/cmake-sonarqube.sh:44:1: E006 Line too long
./shell/cmake-stage.sh:42:1: E006 Line too long
./shell/cmake-stage.sh:64:1: E006 Line too long
./shell/cmake-stage.sh:68:1: E006 Line too long

Issue-ID: RELENG-4358
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Change-Id: I5f4a9dab38287901fcac9937fec111a1020de27e

shell/autotools-sonarqube.sh
shell/check-info-votes.sh
shell/cmake-sonar.sh
shell/cmake-sonarqube.sh
shell/cmake-stage.sh

index c52b9bb..c8e2083 100644 (file)
@@ -56,6 +56,7 @@ eval $c --prefix="$INSTALL_PREFIX" $configure_opts
 # $make_opts may be empty
 # make needs to wordsplit to pass options
 # shellcheck disable=SC2086
-eval /opt/build-wrapper/build-wrapper-linux-x86-64 --out-dir "$build_wrap_dir" make $make_opts
+eval /opt/build-wrapper/build-wrapper-linux-x86-64 --out-dir \
+    "$build_wrap_dir" make $make_opts
 
 echo "---> autotools-sonarqube.sh ends"
index da6b608..69d0b48 100644 (file)
@@ -42,7 +42,8 @@ $pip install --user lftools[nexus]
 $pip install --user jsonschema
 
 echo "Checking votes:"
-lftools infofile check-votes INFO.yaml "$GERRIT_URL" "$ref" > gerrit_comment.txt
+lftools infofile check-votes INFO.yaml "$GERRIT_URL" \
+    "$ref" > gerrit_comment.txt
 exit_status="$?"
 
 if [[ "$exit_status" -ne 0 ]]; then
@@ -51,7 +52,9 @@ if [[ "$exit_status" -ne 0 ]]; then
     exit "$exit_status"
 else
     echo "Vote completed submitting review"
-    ssh -p "$GERRIT_PORT" "$USER"@"$GERRIT_HOST" gerrit review "$GERRIT_PATCHSET_REVISION" --verified 1
+    ssh -p "$GERRIT_PORT" "$USER"@"$GERRIT_HOST" gerrit review \
+        "$GERRIT_PATCHSET_REVISION" --verified 1
     sleep 5
-    ssh -p "$GERRIT_PORT" "$USER"@"$GERRIT_HOST" gerrit review "$GERRIT_PATCHSET_REVISION" --submit
+    ssh -p "$GERRIT_PORT" "$USER"@"$GERRIT_HOST" gerrit review \
+        "$GERRIT_PATCHSET_REVISION" --submit
 fi
index e64ca69..0bbf559 100644 (file)
@@ -22,13 +22,18 @@ set -ex -o pipefail
 
 export SET_JDK_VERSION="${SET_JDK_VERSION:-openjdk11}"
 echo "$SET_JDK_VERSION"
-bash <(curl -s https://raw.githubusercontent.com/lfit/releng-global-jjb/master/shell/update-java-alternatives.sh)
+GITHUB_RAW_BASE_URL="https://raw.githubusercontent.com"
+GITHUB_FILE="lfit/releng-global-jjb/master/shell/update-java-alternatives.sh"
+bash <(curl -s "${GITHUB_RAW_BASE_URL}/${GITHUB_FILE}")
 # shellcheck disable=SC1091
 source /tmp/java.env
 
 cd /tmp || exit 1
+SONAR_BASE_URL="https://binaries.sonarsource.com"
+SONAR_SCANER_PATH="Distribution/sonar-scanner-cli"
+SONAR_SCANER_CLI="sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip"
 wget -q -O /tmp/sonar-scan.zip \
-    "https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip"
+    "${SONAR_BASE_URL}/${SONAR_SCANER_PATH}/${SONAR_SCANER_CLI}"
 unzip -q sonar-scan.zip
 sudo mv sonar-scanner-* /opt/sonar-scanner
 
@@ -45,8 +50,8 @@ eval cmake -DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX" $cmake_opts ..
 
 # $make_opts may be empty.
 # shellcheck disable=SC2086
-/opt/build-wrapper/build-wrapper-linux-x86-64 --out-dir "$WORKSPACE/bw-output" \
-    make $make_opts
+/opt/build-wrapper/build-wrapper-linux-x86-64 --out-dir \
+    "$WORKSPACE/bw-output" make $make_opts
 
 /opt/sonar-scanner/bin/sonar-scanner \
     -Dsonar.projectKey="${PROJECT_KEY}" \
index f34f7d7..d335419 100644 (file)
@@ -28,7 +28,9 @@ sudo mv build-wrapper-* /opt/build-wrapper
 
 export SET_JDK_VERSION="${SET_JDK_VERSION:-openjdk11}"
 echo "$SET_JDK_VERSION"
-bash <(curl -s https://raw.githubusercontent.com/lfit/releng-global-jjb/master/shell/update-java-alternatives.sh)
+GITHUB_RAW_BASE_URL="https://raw.githubusercontent.com"
+GITHUB_FILE="lfit/releng-global-jjb/master/shell/update-java-alternatives.sh"
+bash <(curl -s "${GITHUB_RAW_BASE_URL}/${GITHUB_FILE}")
 # shellcheck disable=SC1091
 source /tmp/java.env
 
@@ -41,6 +43,7 @@ eval cmake -DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX" $cmake_opts ..
 
 # $make_opts may be empty.
 # shellcheck disable=SC2086
-/opt/build-wrapper/build-wrapper-linux-x86-64 --out-dir "$build_wrap_dir" make $make_opts
+/opt/build-wrapper/build-wrapper-linux-x86-64 --out-dir "$build_wrap_dir" \
+    make $make_opts
 
 echo "---> cmake-sonarqube.sh ends"
index b91d6e1..ad3fbee 100644 (file)
@@ -39,7 +39,8 @@ if [ -z "${version}" ]; then
     fi
 fi
 
-repo_id=$(lftools deploy nexus-stage-repo-create "$NEXUS_URL" "$staging_profile_id")
+repo_id=$(lftools deploy nexus-stage-repo-create "$NEXUS_URL" \
+    "$staging_profile_id")
 
 mapfile -t artifacts < <(ls "$WORKSPACE"/dist)
 for artifact in "${artifacts[@]}"; do
@@ -61,9 +62,11 @@ for artifact in "${artifacts[@]}"; do
         src.tar.xz
 done
 
-lftools deploy nexus-stage-repo-close "$NEXUS_URL" "$staging_profile_id" "$repo_id"
+lftools deploy nexus-stage-repo-close "$NEXUS_URL" "$staging_profile_id" \
+    "$repo_id"
 
 PATCH_DIR="$WORKSPACE/archives/patches"
 mkdir -p "$PATCH_DIR"
-echo "$PROJECT" "$(git rev-parse --verify HEAD)" | tee -a "$PATCH_DIR/taglist.log"
+echo "$PROJECT" "$(git rev-parse --verify HEAD)" | \
+    tee -a "$PATCH_DIR/taglist.log"
 echo "$repo_id" > "$WORKSPACE/archives/staging-repo.txt"