Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Commit

Permalink
CI: static check for openstack git URL
Browse files Browse the repository at this point in the history
Fixes: #1483

Use git ls-remote instead of curl for git URL check

Signed-off-by: Xu Wang <[email protected]>
  • Loading branch information
gnawux committed Apr 18, 2019
1 parent ab9a4e8 commit 0d28f77
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .ci/static-checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,12 @@ check_docs()
# Google APIs typically require an auth token.
echo "$url"|grep -q 'https://www.googleapis.com' && continue

# Git repo URL check
if echo "$url"|grep -q '^https.*git'
then
git ls-remote "$url" > /dev/null 2>&1 && continue
fi

# Check the URL, saving it if invalid
( curl -sLf -o /dev/null "$url" ||\
echo "$url" >> "$invalid_urls") &
Expand Down

0 comments on commit 0d28f77

Please sign in to comment.