From 4ea0763cded69651f2da278b1312b096315fbfe2 Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Tue, 21 Jun 2022 12:43:45 +0300 Subject: [PATCH] chore: Prefer `[[` over `[` in bash build scripts --- scripts/lib.sh | 2 +- scripts/sign_darwin.sh | 2 +- scripts/yarn_install.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/lib.sh b/scripts/lib.sh index c67c9fba55876..0d6fb578d889c 100644 --- a/scripts/lib.sh +++ b/scripts/lib.sh @@ -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 diff --git a/scripts/sign_darwin.sh b/scripts/sign_darwin.sh index f1bfef735767b..9511b41302e51 100755 --- a/scripts/sign_darwin.sh +++ b/scripts/sign_darwin.sh @@ -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 diff --git a/scripts/yarn_install.sh b/scripts/yarn_install.sh index 9ebf3a8d49320..45a7dbf7e559e 100755 --- a/scripts/yarn_install.sh +++ b/scripts/yarn_install.sh @@ -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 pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy