chore: Prefer [[ over [ in bash build scripts (#2543)

This commit is contained in:
Mathias Fredriksson
2022-06-21 19:51:32 +03:00
committed by GitHub
parent fe81b0b859
commit 64f0473499
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -156,7 +156,7 @@ if [[ "${CODER_LIBSH_NO_CHECK_DEPENDENCIES:-}" != *t* ]]; then
# we capture the version output first before
make_version_raw="$(make --version 2>/dev/null)"
make_version="$(echo "$make_version_raw" | head -n1 | grep -oE '([[:digit:]]+\.){1,2}[[:digit:]]+')"
if [ "${make_version//.*/}" -lt 4 ]; then
if [[ ${make_version//.*/} -lt 4 ]]; then
libsh_bad_dependencies=1
log "ERROR: You need at least make 4.0 to run the scripts in the Coder repo."
if isdarwin; then
+1 -1
View File
@@ -48,7 +48,7 @@ rc=0
for i in $(seq 1 2); do
gon "$config" && rc=0 && break || rc=$?
log "gon exit code: $rc"
if [ "$i" -lt 5 ]; then
if [[ $i -lt 5 ]]; then
log
log "Retrying notarization in 60 seconds"
log
+1 -1
View File
@@ -23,7 +23,7 @@ PROJECT_ROOT=$(cd "$SCRIPT_DIR" && git rev-parse --show-toplevel)
# --check-files
)
if [ -n "${CI:-}" ]; then
if [[ -n ${CI:-} ]]; then
yarn_flags+=(
# Install dependencies from lockfile, ensuring builds are fully
# reproducible