From f4fdd27867275aef98e5bc513830cb81debab7c3 Mon Sep 17 00:00:00 2001 From: Daniel Nelson Date: Fri, 27 Mar 2020 15:39:32 -0700 Subject: [PATCH] Add docs for how to handle errors in check-deps script (#7243) --- scripts/check-deps.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/scripts/check-deps.sh b/scripts/check-deps.sh index 793a9b49a67d5..2d3c02dadf5d8 100755 --- a/scripts/check-deps.sh +++ b/scripts/check-deps.sh @@ -48,8 +48,19 @@ for dep in $(LC_ALL=C sort -u "${tmpdir}/golist"); do dep="${dep%%/v[0-9]}" dep="${dep%%/v[0-9][0-9]}" - echo "${dep}" >> "${tmpdir}/actual" + echo "${dep}" >> "${tmpdir}/HEAD" done -grep '^-' docs/LICENSE_OF_DEPENDENCIES.md | grep -v github.com/DataDog/datadog-agent | cut -f 2 -d' ' > "${tmpdir}/expected" -diff -U0 "${tmpdir}/expected" "${tmpdir}/actual" +grep '^-' docs/LICENSE_OF_DEPENDENCIES.md | grep -v github.com/DataDog/datadog-agent | cut -f 2 -d' ' > "${tmpdir}/LICENSE_OF_DEPENDENCIES.md" + +diff -U0 "${tmpdir}/LICENSE_OF_DEPENDENCIES.md" "${tmpdir}/HEAD" || +cat - <