File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 2828 id : get_latest_version
2929 run : |
3030 echo "Debugging curl output for NuGet versions:"
31- curl_output=$(curl -s "https://api.nuget.org/v3-flatcontainer/SimpleDataGrid/index.json")
32- echo "$curl_output"
33- LATEST_VERSION=$(echo "$curl_output" | jq -r '.versions[0]')
31+ HTTP_CODE=$(curl -s -o curl_output.txt -w "%{http_code}" "https://api.nuget.org/v3-flatcontainer/SimpleDataGrid/index.json")
32+ echo "HTTP Status Code: $HTTP_CODE"
33+ cat curl_output.txt
34+ if [ "$HTTP_CODE" -eq 200 ]; then
35+ LATEST_VERSION=$(cat curl_output.txt | jq -r '.versions[0]')
36+ else
37+ echo "Curl failed or returned non-200 status. Assuming no previous version."
38+ LATEST_VERSION=""
39+ fi
3440 echo "LATEST_VERSION=$LATEST_VERSION" >> $GITHUB_ENV
3541
3642 - name : Compare versions
You can’t perform that action at this time.
0 commit comments