File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -217,6 +217,20 @@ check_deps() {
217217 return 0
218218}
219219
220+ # Checks licenses.
221+ #
222+ # $1 - log file
223+ check_licenses () {
224+ echo ' Checking licenses...' >&2
225+ make check-licenses-production >> " $1 " 2>&1
226+ if [[ " $? " -ne 0 ]]; then
227+ echo ' Detected dependency licensing issues.' >&2
228+ return 1
229+ fi
230+ echo ' No dependency licensing issues detected.' >&2
231+ return 0
232+ }
233+
220234# Performs lint tasks.
221235#
222236# $1 - log file
@@ -305,7 +319,7 @@ main() {
305319 local len
306320 local i
307321
308- TASKS=(check_deps lint)
322+ TASKS=(check_deps check_licenses lint)
309323 len=" ${# TASKS[@]} "
310324
311325 create_log_file " ${log_file} "
@@ -336,6 +350,11 @@ main() {
336350 if [[ " $? " -ne 0 ]]; then
337351 on_error 1
338352 fi
353+ elif [[ " ${task} " = " check_licenses" ]]; then
354+ check_licenses " ${log_file} "
355+ if [[ " $? " -ne 0 ]]; then
356+ on_error 1
357+ fi
339358 elif [[ " ${task} " = " lint" ]]; then
340359 lint " ${log_file} "
341360 if [[ " $? " -ne 0 ]]; then
You can’t perform that action at this time.
0 commit comments