Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
sebthom committed Jul 19, 2024
1 parent 5e84d4b commit 413d0f3
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,17 @@ runs:
(set -x; wget --spider --timeout=5 --header='Accept: */*' https://github.com/mikefarah/yq/releases/latest 2>&1 | grep 'Location:' | awk '{print $2}')
(set -x; wget --spider --timeout=5 --header='Accept: */*' https://github.com/mikefarah/yq/releases/latest 2>&1 | grep 'Location:' | awk '{print $2}' | grep -o '[^/]*$')
(set -x; wget --spider --timeout=5 --header='Accept: */*' https://github.com/mikefarah/yq/releases/latest 2>&1 | grep 'Location:' | awk '{print $2}' | grep -o '[^/]*$' | cut -c2-)
function get_latest_version() {
# currently broken because of https://github.com/curl/curl/issues/13845
# (set -x; curl -sSfL --max-time 5 -o /dev/null -w '%{url_effective}' $APP_REPO_ROOT/releases/latest | grep -o '[^/]*$' | cut -c2-)
# temporary workaround for https://github.com/curl/curl/issues/13845
if [[ $RUNNER_OS == "Windows" ]]; then
Windows)
(set -x; powershell -Command "(Invoke-WebRequest -Uri '$APP_REPO_ROOT/releases/latest' -Method Head -MaximumRedirection 0 -ErrorAction Ignore -UseBasicParsing).Headers.Location")
;;
return
fi
(set -x; wget --spider --timeout=5 --header='Accept: */*' https://github.com/mikefarah/yq/releases/latest 2>&1 | grep 'Location:' | awk '{print $2}' | grep -o '[^/]*$' | cut -c2-)
(set -x; curl -sSfL --max-time 5 -o /dev/null -w '%{url_effective}' $APP_REPO_ROOT/releases/latest | grep -o '[^/]*$' | cut -c2-)
}
app_downloaded=false
Expand Down

0 comments on commit 413d0f3

Please sign in to comment.