Skip to content

Commit

Permalink
Merge pull request #56 from sublimelsp/update/workflow
Browse files Browse the repository at this point in the history
fix workflow. Also test before merge :D
  • Loading branch information
TerminalFi committed Jun 11, 2023
2 parents 04cdf90 + 2d014d3 commit b1fb5fd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/gopls_update_check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
compareTag:
runs-on: ubuntu-latest
outputs:
latest_tag: ${{ steps.tagCompare.outputs.LATEST_TAG }}
latest_tag: ${{ steps.tagCompare.outputs.LATEST_VERSION }}
requires_update: ${{ steps.tagCompare.outputs.REQUIRES_UPDATE }}
branch_name: ${{ steps.tagCompare.outputs.BRANCH_NAME }}
steps:
Expand All @@ -34,7 +34,8 @@ jobs:
check-latest: true
cache: true
- name: Install GOPLS
run: go install "golang.org/x/tools/gopls@v${{ needs.compareTag.outputs.latest_tag }}"
run: |
go install golang.org/x/tools/gopls@v${{ needs.compareTag.outputs.latest_tag }}
- uses: actions/setup-python@v4
- name: Update VERSION
run: |
Expand Down
9 changes: 5 additions & 4 deletions scripts/compare_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ def get_latest_version(self, tags: list) -> str:
print("[get_latest_version] Regex match failed. Could not find latest version from tags.")
exit(1)

if len(version.groups()) == 2 and version.group(2) is not None:
print(f"Found latest version: {version.group(1)}-{version.group(2)}")
print("Latest version appears to be a pre-release. Skipping.")
exit(0)
if version.group(2) is not None:
print(f'[get_latest_version] Version is {version.group(1)}-{version.group(2)}')
return f'{version.group(1)}-{version.group(2)}'

print(f'[get_latest_version] Version is {version.group(1)}')
return version.group(1)
print("[get_latest_version] Could not find latest version from tags.")
exit(1)
Expand Down

0 comments on commit b1fb5fd

Please sign in to comment.