diff --git a/.circleci/config.yml b/.circleci/config.yml index aed67fb7870..21e50a3fb7d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -204,7 +204,12 @@ jobs: - run: name: Install ShellCheck command: | - sudo apt-get update && sudo apt-get install -y shellcheck + VERSION=0.7.1 + CHKSUM=beca3d7819a6bdcfbd044576df4fc284053b48f468b2f03428fe66f4ceb2c05d9b5411357fa15003cb0311406c255084cf7283a3b8fce644c340c2f6aa910b9f + curl -fLO http://storage.googleapis.com/grafana-downloads/ci-dependencies/shellcheck-v${VERSION}.linux.x86_64.tar.xz + echo $CHKSUM shellcheck-v${VERSION}.linux.x86_64.tar.xz | sha512sum --check --strict --status + tar xf shellcheck-v${VERSION}.linux.x86_64.tar.xz + sudo mv shellcheck-v${VERSION}/shellcheck /usr/local/bin/ - run: name: ShellCheck command: | diff --git a/scripts/ci-metrics-publisher.sh b/scripts/ci-metrics-publisher.sh index 6083b7a41af..a2da5ef98ce 100755 --- a/scripts/ci-metrics-publisher.sh +++ b/scripts/ci-metrics-publisher.sh @@ -8,7 +8,7 @@ for ((i = 1; i <= $#; i++ )); do remainder="${!i}" # Find everything until last = character (= is included in the result) # This allows to add tags to metric names - metricName=$(grep -o "\(.*\)=" <<< $remainder) + metricName=$(grep -o "\(.*\)=" <<< "$remainder") # Get the metric value value=${remainder#"$metricName"} # Remove remaining = character from metric name