Skip to content

Commit

Permalink
Add docs for how to handle errors in check-deps script (influxdata#7243)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielnelson authored and Mathieu Lecarme committed Apr 17, 2020
1 parent aff32ea commit 6508808
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions scripts/check-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 - <<EOF
The docs/LICENSE_OF_DEPENDENCIES.md file does not contain the expected entries.
Lines prefixed with '+' should be added to LICENSE_OF_DEPENDENCIES.md and '-'
lines should be removed.
Include a link to the appropriate licenses for any additions.
EOF

0 comments on commit 6508808

Please sign in to comment.