Skip to content

Commit

Permalink
Fix npm scripts tests (#2285)
Browse files Browse the repository at this point in the history
  • Loading branch information
yahavi authored Oct 25, 2023
1 parent 8809b7f commit 3db83b2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/scriptTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,26 @@ jobs:
./jf${{ matrix.suite.osSuffix }} --version
if: ${{ matrix.suite.os == 'windows' }}

# Prior to the release, we set the new version in the package.json files, introducing the prereleased version.
# This adjustment may result in an attempt to download a version that hasn't been published to releases.jfrog.io yet.
# To handle it, we fetch the most recent JFrog CLI release and store it in the LATEST_RELEASE step output.
- name: "Get latest release"
id: latest-release
run: |
export LATEST_RELEASE=`curl https://api.github.com/repos/jfrog/jfrog-cli/releases/latest -s | jq .name -r | cut -c 2-`
echo "LATEST_RELEASE=$LATEST_RELEASE" >> "$GITHUB_OUTPUT"
shell: bash

- name: Test install npm - v2
working-directory: build/npm/v2
run: |
npm version ${{ steps.latest-release.outputs.LATEST_RELEASE }} --allow-same-version
npm install
./bin/jfrog${{ matrix.suite.osSuffix }} --version
- name: Test install npm - v2-jf
working-directory: build/npm/v2-jf
run: |
npm version ${{ steps.latest-release.outputs.LATEST_RELEASE }} --allow-same-version
npm install
./bin/jf${{ matrix.suite.osSuffix }} --version

0 comments on commit 3db83b2

Please sign in to comment.