Skip to content

Commit

Permalink
Change the version parsing command's regex to handle the case of doub…
Browse files Browse the repository at this point in the history
…le digits of minor versions (opensearch-project#1537)

Signed-off-by: Ryan Liang <[email protected]>
Co-authored-by: Craig Perkins <[email protected]>
  • Loading branch information
RyanL1997 and cwperks authored Aug 3, 2023
1 parent 95f316a commit fbfe8d0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/actions/install-dashboards/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ runs:

- id: osd-version
run: |
echo "::set-output name=osd-version::$(cat package.json | jq '.opensearchDashboards.version' | cut -c 2-4)"
echo "::set-output name=osd-x-version::$(cat package.json | jq '.opensearchDashboards.version' | cut -c 2-3)"
echo "::set-output name=osd-version::$(jq -r '.opensearchDashboards.version | split(".") | .[:2] | join(".")' package.json)"
echo "::set-output name=osd-x-version::$(jq -r '.opensearchDashboards.version | split(".") | .[0]' package.json).x"
working-directory: ${{ steps.determine-plugin-directory.outputs.plugin-directory }}
shell: bash

- id: branch-switch-if-possible
continue-on-error: true # Defaults onto main if the branch switch doesn't work
if: ${{ steps.osd-version.outputs.osd-version }}
run: git checkout ${{ steps.osd-version.outputs.osd-version }} || git checkout ${{ steps.osd-version.outputs.osd-x-version }}x
run: git checkout ${{ steps.osd-version.outputs.osd-version }} || git checkout ${{ steps.osd-version.outputs.osd-x-version }}
working-directory: ./OpenSearch-Dashboards
shell: bash

Expand Down

0 comments on commit fbfe8d0

Please sign in to comment.