Files
gerrit/tools/bzl/test_license.sh
Yuxuan 'fishy' Wang 9d0e8eac3b bazel: generate licenses.txt
Modify license_map rule to:

- Accept more than 1 targets
- Add '--asciidoctor' option to generate asciidoctor txt file
- Add support for multiple licenses for a single target (diffy_logo)

Also add test_license.sh for license_test rule to handle special
DO_NOT_DISTRIBUTE exceptions.

TESTED:
  bazel build Documentation:licenses.txt
  bazel test gerrit-pgm:pgm_license_test
  bazel test gerrit-gwtui:ui_module_license_test

Change-Id: Ic64b227fea34882721e6e064b1520cd9a4d5d4a4
2016-09-28 04:57:42 +08:00

17 lines
267 B
Bash
Executable File

#!/bin/sh
filtered="$1.filtered"
cat $1 \
| grep -v "//lib/bouncycastle:bcpg" \
| grep -v "//lib/bouncycastle:bcpkix" \
| grep -v "//lib/bouncycastle:bcprov" \
> $filtered
if test -s $filtered
then
echo "$filtered not empty:"
cat $filtered
exit 1
fi