Skip to content

Commit

Permalink
Retry on curl errors
Browse files Browse the repository at this point in the history
  • Loading branch information
plengauer authored Apr 28, 2024
1 parent 16c4292 commit d78ffd2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.10.0
3.11.0
4 changes: 2 additions & 2 deletions package/usr/bin/gitaptly_scan
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ else
fi
per_page=100
url="https://api.github.com/repos/$1/releases?per_page=$per_page"
curl --no-progress-meter --fail --head -H "$auth_header" "$url" \
curl --no-progress-meter --fail --retry 16 --retry-all-errors --head -H "$auth_header" "$url" \
| grep '^link: ' | cut -d ' ' -f 2- | tr -d ' <>' | tr ',' '\n' \
| grep 'rel="last"' | cut -d ';' -f1 | cut -d '?' -f 2- | tr '&' '\n' \
| grep '^page=' | cut -d = -f 2 \
| xargs seq 1 | xargs parallel -q curl --no-progress-meter --fail -H "$auth_header" "$url"\&page={} ::: \
| xargs seq 1 | xargs parallel -q curl --no-progress-meter --fail --retry 16 --retry-all-errors -H "$auth_header" "$url"\&page={} ::: \
| jq '.[] | .assets[] | .browser_download_url' -r | (grep '.deb$' || true)

0 comments on commit d78ffd2

Please sign in to comment.