Skip to content

Commit ff58260

Browse files
Luni-4marco-c
authored andcommitted
Split script to update a submodule in two scripts
Since a CI system uses the commit present in a repository that already contain the differences, it is not necessary to update the tree-sitter-language
1 parent f9a4a9c commit ff58260

3 files changed

Lines changed: 21 additions & 17 deletions

File tree

update-language-bindings.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
# Recreate the language
4+
pushd enums
5+
cargo clean
6+
cargo run -- -lrust -o ../src/languages
7+
popd
8+
9+
# Format the code
10+
cargo fmt

update-submodule.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
# Update tree-sitter submodule
4+
#
5+
# Usage: ./update-submodule.sh $tree-sitter-language
6+
7+
# Update submodule
8+
git submodule update --remote $1
9+
10+
# Generate the updated grammar for the submodule
11+
./update-language-bindings.sh

update-sumbodules.sh

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)