From b77de97136137e2a2227557c28dfd99ed54ebc62 Mon Sep 17 00:00:00 2001 From: Anthony Romano Date: Mon, 24 Apr 2017 16:10:32 -0700 Subject: [PATCH] test: bill of materials check pass --- test | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/test b/test index 2f8c7db7f..5284cbdb7 100755 --- a/test +++ b/test @@ -20,7 +20,7 @@ source ./build etcd_setup_gopath if [ -z "$PASSES" ]; then - PASSES="fmt dep compile build unit" + PASSES="fmt bom dep compile build unit" fi # Invoke ./cover for HTML output @@ -329,6 +329,21 @@ function fmt_pass { done } +function bom_pass { + if ! which license-bill-of-materials >/dev/null; then + return + fi + echo "Checking bill of materials..." + license-bill-of-materials \ + --override-file bill-of-materials.override.json \ + github.com/coreos/etcd github.com/coreos/etcd/etcdctl >bom-now.json || true + if ! diff bill-of-materials.json bom-now.json; then + echo vendored licenses do not match given bill of materials + exit 255 + fi + rm bom-now.json +} + function dep_pass { echo "Checking package dependencies..." # don't pull in etcdserver package