From 5e50749aa7e683346de11508bea76de8fe2dda2f Mon Sep 17 00:00:00 2001 From: Carlos Garcia Ortiz karliatto Date: Wed, 15 May 2024 10:47:05 +0200 Subject: [PATCH] ci(scripts): fix args in check-version --- .github/actions/release-connect-npm/action.yml | 4 ++-- ci/scripts/check-version.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/actions/release-connect-npm/action.yml b/.github/actions/release-connect-npm/action.yml index 9cf60cf6e1d..4665ba5ceb1 100644 --- a/.github/actions/release-connect-npm/action.yml +++ b/.github/actions/release-connect-npm/action.yml @@ -7,7 +7,7 @@ inputs: type: choice options: - beta - - production + - latest packageName: description: "The name of the package to be deployed. Select from the predefined list of packages." required: true @@ -57,7 +57,7 @@ runs: - name: Check version shell: bash - run: node ./ci/scripts/check-version.js ${{ inputs.packageName }} ${{ steps.extract_branch.outputs.branch }} ${{ inputs.deploymentType }} + run: node ./ci/scripts/check-version.js ${{ inputs.packageName }} ${{ inputs.deploymentType }} - name: Set NPM token shell: bash diff --git a/ci/scripts/check-version.js b/ci/scripts/check-version.js index 479fcd341d5..906fe5e0168 100644 --- a/ci/scripts/check-version.js +++ b/ci/scripts/check-version.js @@ -7,9 +7,9 @@ const path = require('path'); const args = process.argv.slice(2); -if (args.length < 3) +if (args.length < 2) throw new Error( - 'Version check script requires 3 parameters: package name, branch name and dist tag (beta | latest)', + 'Version check script requires 2 parameters: package name and dist tag (beta | latest)', ); const [packageName, distTag] = args;