File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 99 runs-on : ${{ matrix.os }}
1010 steps :
1111 - uses : actions/checkout@v3
12+ - name : Debug getLatestRelease function
13+ run : |
14+ getLatestRelease() {
15+ local KCLReleaseUrl="https://api.github.com/repos/${GITHUB_ORG}/${GITHUB_REPO}/releases"
16+ local latest_release=""
17+
18+ if [ "$KCL_HTTP_REQUEST_CLI" == "curl" ]; then
19+ response=$(curl -s $KCLReleaseUrl)
20+ echo "API Response: $response" # 打印 API 返回的数据
21+ latest_release=$(echo "$response" | grep \"tag_name\" | grep -v rc | awk 'NR==1{print $2}' | sed -n 's/\"\(.*\)\",/\1/p')
22+ else
23+ response=$(wget -q --header="Accept: application/json" -O - $KCLReleaseUrl)
24+ echo "API Response: $response" # 打印 API 返回的数据
25+ latest_release=$(echo "$response" | grep \"tag_name\" | grep -v rc | awk 'NR==1{print $2}' | sed -n 's/\"\(.*\)\",/\1/p')
26+ fi
27+
28+ echo "Latest Release: $latest_release" # 打印解析后的结果
29+ ret_val=$latest_release
30+ }
31+
32+ getLatestRelease
1233 - name : Check Install Script KCL Language Server
1334 run : curl -fsSL https://kcl-lang.io/script/install-kcl-lsp.sh | /bin/bash
1435 - name : Check run
You can’t perform that action at this time.
0 commit comments