Skip to content

Commit ce15187

Browse files
committed
fix: download jar from Maven Central, not repo
1 parent 1f73259 commit ce15187

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

.github/workflows/build-linux-ts-native.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- name: Install build tools
1313
run: |
1414
sudo apt-get update
15-
sudo apt-get install -y build-essential python3 git openjdk-17-jdk-headless maven
15+
sudo apt-get install -y build-essential python3 git openjdk-17-jdk-headless
1616
1717
- name: Clone java-tree-sitter
1818
run: |
@@ -33,12 +33,10 @@ jobs:
3333
3434
- name: Patch java-tree-sitter-1.9.1.jar with glibc .so
3535
run: |
36-
JAR="mode/java-tree-sitter-1.9.1.jar"
37-
if [ ! -f "$JAR" ]; then
38-
echo "ERROR: $JAR not found in repo"
39-
exit 1
40-
fi
41-
cp "$JAR" "$JAR.bak"
36+
# Download jar from Maven Central (it's not committed to the repo)
37+
JAR="java-tree-sitter-1.9.1.jar"
38+
echo "Downloading $JAR from Maven Central…"
39+
curl -fsSL "https://repo1.maven.org/maven2/ch/usi/si/seart/java-tree-sitter/1.9.1/$JAR" -o "$JAR"
4240
# Replace the bundled musl .so with our glibc-compiled one
4341
zip -j "$JAR" java-tree-sitter/libjava-tree-sitter.so
4442
echo "Patched $JAR:"
@@ -49,5 +47,5 @@ jobs:
4947
name: linux-ts-native
5048
path: |
5149
java-tree-sitter/libjava-tree-sitter.so
52-
mode/java-tree-sitter-1.9.1.jar
50+
java-tree-sitter-1.9.1.jar
5351
retention-days: 90

0 commit comments

Comments
 (0)