Commit f4d40224 by Arve Knudsen Committed by GitHub

CircleCI: Upgrade shellcheck to v0.7.1 and pin version (#23815)

* CircleCI: Upgrade shellcheck to v0.7.1 and pin version

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
parent 3d89f045
......@@ -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: |
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment