Commit 584058be authored by Tomas Norre Mikkelsen's avatar Tomas Norre Mikkelsen
Browse files

[CI][BUGFIX] Round number to have correct badge colors returned

parent 5cb86fdb
Pipeline #9913 passed with stages
in 3 minutes and 3 seconds
#!/usr/bin/env bash
###
# This script is a helper for the anybadge to set the color based on the number result
###
# Makes sure that we have a , and not a . decimal number
# shellcheck disable=SC2001
n=$(echo "$1" | sed 's/\./,/g')
# Round the number to not have problems with decimals
n=$(echo "$1/1" | bc)
if [[ "$n" -ge "0" ]] && [[ "$n" -lt "50" ]]; then
echo 'red'
......
Supports Markdown
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