cirrus: Remove bashisms from test script to make it compatible with /bin/sh
Bash is not installed on the FreeBSD images here and the location would be different anyway (`/usr/local/bin/bash`, so we'd have to change the hashbang to e.g. `/usr/bin/env bash`).
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
freebsd_instance:
|
freebsd_instance:
|
||||||
image: freebsd-12-0-release-amd64
|
image: freebsd-12-1-release-amd64
|
||||||
|
|
||||||
env:
|
env:
|
||||||
TESTS_REDUCED_KEYLENGTHS: yes
|
TESTS_REDUCED_KEYLENGTHS: yes
|
||||||
|
|||||||
+3
-3
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
# Build script for Travis CI
|
# Build script for Travis CI
|
||||||
|
|
||||||
build_botan()
|
build_botan()
|
||||||
@@ -306,7 +306,7 @@ lgtm)
|
|||||||
-H 'Accept: application/json' \
|
-H 'Accept: application/json' \
|
||||||
-H "Authorization: Bearer ${LGTM_TOKEN}" > lgtm.res || exit $?
|
-H "Authorization: Bearer ${LGTM_TOKEN}" > lgtm.res || exit $?
|
||||||
lgtm_check_url=$(jq -r '."task-result-url"' lgtm.res)
|
lgtm_check_url=$(jq -r '."task-result-url"' lgtm.res)
|
||||||
if [ "$lgtm_check_url" == "null" ]; then
|
if [ "$lgtm_check_url" = "null" ]; then
|
||||||
cat lgtm.res | jq
|
cat lgtm.res | jq
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -337,7 +337,7 @@ lgtm)
|
|||||||
lgtm_new=$(jq -r '.languages[].new' lgtm.res | awk '{t+=$1} END {print t}')
|
lgtm_new=$(jq -r '.languages[].new' lgtm.res | awk '{t+=$1} END {print t}')
|
||||||
lgtm_fixed=$(jq -r '.languages[].fixed' lgtm.res | awk '{t+=$1} END {print t}')
|
lgtm_fixed=$(jq -r '.languages[].fixed' lgtm.res | awk '{t+=$1} END {print t}')
|
||||||
echo -n "Code review complete: "
|
echo -n "Code review complete: "
|
||||||
echo -e "\e[1;31m${lgtm_new}\e[0m new alerts, \e[1;32m${lgtm_fixed}\e[0m fixed"
|
printf "%b\n" "\e[1;31m${lgtm_new}\e[0m new alerts, \e[1;32m${lgtm_fixed}\e[0m fixed"
|
||||||
exit $lgtm_new
|
exit $lgtm_new
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|||||||
Reference in New Issue
Block a user