Skip to content

Commit

Permalink
💚 Fix github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Freed-Wu committed Feb 13, 2024
1 parent 50f4c24 commit f2f1d44
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ string(REGEX MATCH [[[0-9](\.[0-9])*]] VERSION "$ENV{GITHUB_REF_NAME}")
if(NOT VERSION)
set(VERSION 0.0.0.0)
endif()
if("$ENV{GITHUB_REPOSITORY}")
if(ENV{GITHUB_REPOSITORY})
set(HOMEPAGE_URL "https://github.com/$ENV{GITHUB_REPOSITORY}")
string(REGEX REPLACE ".*/tree-sitter-([^/]*)$" "\\1" LANGUAGE ${HOMEPAGE_URL})
string(REGEX REPLACE ".*/tree-sitter-([^/]*)$" "\\1" LANGUAGE $ENV{GITHUB_REPOSITORY})
else()
set(HOMEPAGE_URL "")
string(REGEX REPLACE ".*/tree-sitter-([^/]*)$" "\\1" LANGUAGE ${CMAKE_CURRENT_SOURCE_DIR})
file(GLOB LANGUAGE "${CMAKE_CURRENT_SOURCE_DIR}/bindings/python/*")
string(REGEX REPLACE ".*/tree_sitter_([^/]*)$" "\\1" LANGUAGE ${LANGUAGE})
endif()
project(
tree-sitter-${LANGUAGE}
Expand Down
3 changes: 2 additions & 1 deletion scripts/build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env bash
cd "$(dirname "$(readlink -f "$0")")/.." || exit 1
set -e
cd "$(dirname "$(readlink -f "$0")")/.."

tree-sitter generate
cmake -Bbuild -DCMAKE_INSTALL_FULL_LIBDIR="${1:-$HOME/.local/share/nvim/repos/github.com/nvim-treesitter/nvim-treesitter}"
Expand Down

0 comments on commit f2f1d44

Please sign in to comment.