mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
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>
This commit is contained in:
parent
3d89f04562
commit
f4d40224f2
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user