From f62e1dde965225ccc131c2a1217a8600628b8ffa Mon Sep 17 00:00:00 2001 From: Yaohui Liu Date: Sun, 22 Oct 2023 15:44:50 +0800 Subject: [PATCH] ci: fix error. --- .github/prepare_release.sh | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/prepare_release.sh b/.github/prepare_release.sh index af715920..33a036e1 100644 --- a/.github/prepare_release.sh +++ b/.github/prepare_release.sh @@ -17,17 +17,18 @@ else echo "At least one of minor version and patch version should be specified." fi -# preparation before packing backends -mkdir ./temp -mkdir ./temp/runtimes -cp ./LLama/runtimes/*.* ./temp/runtimes/ -cp ./LLama/runtimes/build/*/* ./temp/ +cur=$(pwd); +echo "Current directory: $cur"; +mkdir ./temp; +mkdir ./temp/runtimes; +cp ./LLama/runtimes/*.* ./temp/runtimes/; +cp ./LLama/runtimes/build/*/* ./temp/; # get the current version -cd temp -dotnet add package LLamaSharp -version=$(dotnet list temp.csproj package | grep LLamaSharp) -regex="[0-9]+\.[0-9]+\.[0-9]+$" +cd temp; +dotnet add package LLamaSharp; +version=$(dotnet list temp.csproj package | grep LLamaSharp); +regex="[0-9]+\.[0-9]+\.[0-9]+$"; if [[ $version =~ $regex ]]; then version="${BASH_REMATCH[0]}" echo "Extracted version: $version"