From 4bc5f2555f48717fc969d3ba8be6e3b27dc2a829 Mon Sep 17 00:00:00 2001 From: Fedja Beader Date: Sat, 9 Sep 2023 18:02:20 +0200 Subject: Re-download cpplint only if needed or older than a day --- tools/ci/jobs/cpplint.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/ci/jobs/cpplint.sh b/tools/ci/jobs/cpplint.sh index b193fd4e3..496e51eb5 100755 --- a/tools/ci/jobs/cpplint.sh +++ b/tools/ci/jobs/cpplint.sh @@ -4,9 +4,12 @@ export LOGFILE=cpplint.log source ./tools/ci/scripts/init.sh -rm cpplint.py -tools/ci/scripts/retry.sh wget "https://raw.githubusercontent.com/google/styleguide/gh-pages/cpplint/cpplint.py" -chmod +x cpplint.py +# Re-download if not executable or older than a day +if [[ ! -x cpplint.py \ + || $(find cpplint.py -mtime 1 -print) ]]; then + tools/ci/scripts/retry.sh wget "https://raw.githubusercontent.com/google/styleguide/gh-pages/cpplint/cpplint.py" + chmod +x cpplint.py +fi CHECKER="./cpplint.py --filter=\ -build/include,\ -- cgit v1.2.3-60-g2f50