diff --git a/.github/workflows/acceptance-test.yml b/.github/workflows/acceptance-test.yml index 9fc76a0..b0734d9 100644 --- a/.github/workflows/acceptance-test.yml +++ b/.github/workflows/acceptance-test.yml @@ -96,8 +96,6 @@ jobs: SECRET: ${{ inputs.secret }} SECRET_IN_SECTION: ${{ inputs.secret-in-section }} MULTILINE_SECRET: ${{ inputs.multiline-secret }} - - name: Verify installed op cli version - run: ./tests/assert-cli-version.sh ${{ inputs.version }} - name: Assert test secret values [step output] if: ${{ !inputs.export-env }} env: diff --git a/.gitignore b/.gitignore index f387123..b509c88 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ coverage/ -node_modules/ \ No newline at end of file +node_modules/ diff --git a/tests/assert-cli-version.sh b/tests/assert-cli-version.sh deleted file mode 100755 index 8610bc1..0000000 --- a/tests/assert-cli-version.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash -set -e - -OP_CLI_VERSION="$1" -CLI_URL="https://app-updates.agilebits.com/product_history/CLI2" - -get_latest_cli_version() { - conditional_path="/beta/" - if [ "$1" == "non_beta" ]; then - conditional_path="!/beta/" - fi - # This long command parses the HTML page at "CLI_URL" and finds the latest CLI version - # based on the release channel we're looking for (stable or beta). - # - # The ideal call (i.e. 'curl https://app-updates.agilebits.com/check/1/0/CLI2/en/2.0.0/Y -s | jq -r .version') - # doesn't retrieve the latest CLI version on a channel basis. - # If the latest release is stable and we want the latest beta, this command will return the stable still. - OP_CLI_VERSION="$(curl -s $CLI_URL | awk -v RS='

|

' 'NR % 2 == 0 {gsub(/[[:blank:]]+/, ""); gsub(/]*>|<\/span>|[\r\n]+/, ""); gsub(/ .*$/, ""); if (!'"$1"' && '"$conditional_path"'){print; '"$1"'=1;}}')" -} - -if [ "$OP_CLI_VERSION" == "latest" ]; then - get_latest_cli_version non_beta -elif [ "$OP_CLI_VERSION" == "latest-beta" ]; then - get_latest_cli_version beta -fi - -if [ "$(op --version)" != "$OP_CLI_VERSION" ]; then - echo -e "Expected CLI version to be:\n$OP_CLI_VERSION\nBut got:\n$(op --version)" - exit 1 -fi