From 7b064bae6b021cad03716b0672326b71fc7e89cc Mon Sep 17 00:00:00 2001 From: takase1121 <20792268+takase1121@users.noreply.github.com> Date: Thu, 30 Nov 2023 09:46:56 +0800 Subject: [PATCH] fix(ci,build.sh): un-hardcode lua subproject detection --- .github/workflows/build.yml | 2 +- scripts/build.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 96db355f..21f3a8b4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -204,7 +204,7 @@ jobs: run: | "INSTALL_NAME=lite-xl-$($env:GITHUB_REF -replace ".*/")-windows-msvc-${{ matrix.arch.name }}" >> $env:GITHUB_ENV "INSTALL_REF=$($env:GITHUB_REF -replace ".*/")" >> $env:GITHUB_ENV - "LUA_SUBPROJECT_PATH=subprojects/lua-5.4.4" >> $env:GITHUB_ENV + "LUA_SUBPROJECT_PATH=subprojects/$(awk -F ' *= *' '/directory/ { printf $2 }' subprojects/lua.wrap)" >> $env:GITHUB_ENV - name: Download and patch subprojects shell: bash run: | diff --git a/scripts/build.sh b/scripts/build.sh index 778f596d..0908ab19 100644 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -181,7 +181,7 @@ main() { # download the subprojects so we can start patching before configure. # this will prevent reconfiguring the project. meson subprojects download - lua_subproject_path=$(echo subprojects/lua-*/) + lua_subproject_path="subprojects/$(awk -F ' *= *' '/directory/ { printf $2 }' subprojects/lua.wrap)" if [[ -d $lua_subproject_path ]]; then patch -d $lua_subproject_path -p1 --forward < resources/windows/001-lua-unicode.diff fi