From 15f69ce6bfccb236c612dd4f87d96fcc9747406c Mon Sep 17 00:00:00 2001 From: Felix Exner Date: Fri, 12 Jun 2020 07:42:05 +0200 Subject: [PATCH 1/2] Add actual documentation link into calibration checker output The output was generated when we didn't have the final repository available. However, updating the output got lost over time... --- ur_robot_driver/src/ur/calibration_checker.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ur_robot_driver/src/ur/calibration_checker.cpp b/ur_robot_driver/src/ur/calibration_checker.cpp index cf44581e6..a6dcaee93 100644 --- a/ur_robot_driver/src/ur/calibration_checker.cpp +++ b/ur_robot_driver/src/ur/calibration_checker.cpp @@ -32,7 +32,9 @@ bool CalibrationChecker::consume(std::shared_ptr Date: Mon, 15 Jun 2020 11:47:25 +0200 Subject: [PATCH 2/2] Draft for checking URLs --- .github/workflows/ci.yml | 13 +++++++++++++ ur_robot_driver/scripts/check_urls.sh | 23 +++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100755 ur_robot_driver/scripts/check_urls.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a27fe992b..a12a1021d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,3 +29,16 @@ jobs: - uses: actions/checkout@v1 - uses: 'ros-industrial/industrial_ci@master' env: ${{matrix.env}} + + + check_urls: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: check URLs + run: | + echo "$(pwd)" + ls -l + ur_robot_driver/scripts/check_urls.sh -r ur_robot_driver/src/ur + #working-directory: ./ur_robot_driver + diff --git a/ur_robot_driver/scripts/check_urls.sh b/ur_robot_driver/scripts/check_urls.sh new file mode 100755 index 000000000..1380a04b5 --- /dev/null +++ b/ur_robot_driver/scripts/check_urls.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +set -e + +#Find URLs in code: +urls=$(grep -oP "(http|ftp|https):\/\/([a-zA-Z0-9_-]+(?:(?:\.[a-zA-Z0-9_-]+)+))([a-zA-Z0-9_.,@?^=%&:\/~+#-]*[a-zA-Z0-9_@?^=%&\/~+#-])?" "$@") + +fail_counter=0 + +for item in $urls; do +# echo $item + filename=$(echo "$item" | cut -d':' -f1) + url=$(echo "$item" | cut -d':' -f2-) +# echo "Checking $url from file $filename" + if ! curl --head --silent --fail "$url" 2>&1 > /dev/null; then + echo "Invalid link in file $filename: $url" + ((fail_counter=fail_counter+1)) + else + echo "$url ok" + fi +done + +exit $fail_counter