Skip to content

Commit

Permalink
fix: add debug info
Browse files Browse the repository at this point in the history
Signed-off-by: zongz <[email protected]>
  • Loading branch information
zong-zhe committed Dec 25, 2024
1 parent aabc174 commit 639da02
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/install-kcl-lsp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,27 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Debug getLatestRelease function
run: |
getLatestRelease() {
local KCLReleaseUrl="https://api.github.com/repos/${GITHUB_ORG}/${GITHUB_REPO}/releases"
local latest_release=""
if [ "$KCL_HTTP_REQUEST_CLI" == "curl" ]; then
response=$(curl -s $KCLReleaseUrl)
echo "API Response: $response" # 打印 API 返回的数据
latest_release=$(echo "$response" | grep \"tag_name\" | grep -v rc | awk 'NR==1{print $2}' | sed -n 's/\"\(.*\)\",/\1/p')
else
response=$(wget -q --header="Accept: application/json" -O - $KCLReleaseUrl)
echo "API Response: $response" # 打印 API 返回的数据
latest_release=$(echo "$response" | grep \"tag_name\" | grep -v rc | awk 'NR==1{print $2}' | sed -n 's/\"\(.*\)\",/\1/p')
fi
echo "Latest Release: $latest_release" # 打印解析后的结果
ret_val=$latest_release
}
getLatestRelease
- name: Check Install Script KCL Language Server
run: curl -fsSL https://kcl-lang.io/script/install-kcl-lsp.sh | /bin/bash
- name: Check run
Expand Down

0 comments on commit 639da02

Please sign in to comment.