From 83858b7236cfd2447749adf420dcfbfa283dcd11 Mon Sep 17 00:00:00 2001 From: Eduard Filip Date: Thu, 6 Jul 2023 12:54:55 +0100 Subject: [PATCH] Extract CLI version without jq (#51) It seems that we can't assume that images have `jq` built-in, therefore we will use `grep` which comes built-in with all UNIX systems to extract the latest CLI version number. --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 7d33880..b0fbff1 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -49,7 +49,7 @@ install_op_cli() { echo "::debug::OP_INSTALL_DIR: ${OP_INSTALL_DIR}" # Get the latest stable version of the CLI - OP_CLI_VERSION="v$(curl https://app-updates.agilebits.com/check/1/0/CLI2/en/2.0.0/N -s | jq -r .version)" + OP_CLI_VERSION="v$(curl https://app-updates.agilebits.com/check/1/0/CLI2/en/2.0.0/N -s | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+')" if [[ "$OSTYPE" == "linux-gnu"* ]]; then # Get runner's architecture