Skip to content

Commit

Permalink
ci(scripts): fix args in check-version
Browse files Browse the repository at this point in the history
  • Loading branch information
karliatto committed May 15, 2024
1 parent 5acdc1b commit 5e50749
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/actions/release-connect-npm/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions ci/scripts/check-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5e50749

Please sign in to comment.