Skip to content

Commit

Permalink
lang: get ts version from the outside, or get latest from remote
Browse files Browse the repository at this point in the history
  • Loading branch information
stackmystack committed May 16, 2024
1 parent a2f4707 commit a42d1cd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
runs-on: ${{ matrix.target.os }}
env:
PLATFORM: ${{ matrix.target.platform }}
TREE_SITTER_VERSION: 0.22.6
steps:
- uses: actions/checkout@v2
- name: Build for ${{ matrix.target.platform }}
Expand Down
9 changes: 8 additions & 1 deletion lang
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,14 @@ shift
# Clone and Build tree-sitter #
# ################################################ #

tstag="0.22.6"
tstag=${TREE_SITTER_VERSION:-$(\
git \
-c 'versionsort.suffix=-' ls-remote --exit-code --refs --sort='version:refname' \
--tags https://github.com/tree-sitter/tree-sitter '*.*.*' \
| tail --lines=1 \
| cut --delimiter='/' --fields=3 \
| sed -E 's/v([0-9]+\.[0-9]+)/\1/' \
)}
TSS="$PWD/tree-sitter" # Tree Sitter Source

if [ ! -d "$TSS" ]
Expand Down

0 comments on commit a42d1cd

Please sign in to comment.