Skip to content

Commit

Permalink
ref: add update script that gets the latest commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
stackmystack committed May 16, 2024
1 parent 26761fa commit a2f4707
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions update/ref
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# /usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
set -vx

tree_sitter='https://github.com/tree-sitter/tree-sitter'
langs=$(cat $PWD/ref | cut -d ':' -f 1)

for lang in $langs
do
ref=$(git ls-remote "$tree_sitter-$lang" refs/heads/master | sed -E 's/^([0-9a-fA-F]+)\s.*$/\1/')
echo "$lang:$ref" >> ref.new
done

mv ref.new ref

0 comments on commit a2f4707

Please sign in to comment.