Skip to content

Commit

Permalink
scripts: add 'BOM' update script
Browse files Browse the repository at this point in the history
Need this script when we add external dependencies.

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
  • Loading branch information
gyuho committed May 9, 2017
1 parent aac2292 commit 353dfa6
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 5 deletions.
10 changes: 5 additions & 5 deletions bill-of-materials.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
[
{
"project": "bitbucket.org/ww/goautoneg",
"license": "BSD 3-clause \"New\" or \"Revised\" License",
"confidence": 1
},
{
"project": "github.com/beorn7/perks/quantile",
"license": "MIT License",
Expand Down Expand Up @@ -203,10 +208,5 @@
"project": "gopkg.in/yaml.v2",
"license": "Apache License 2.0 and MIT License",
"confidence": 1
},
{
"project": "bitbucket.org/ww/goautoneg",
"license": "BSD 3-clause \"New\" or \"Revised\" License",
"confidence": 1
}
]
25 changes: 25 additions & 0 deletions scripts/updatebom.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash

set -e

if ! [[ "$0" =~ "scripts/updatebom.sh" ]]; then
echo "must be run from repository root"
exit 255
fi

echo "installing 'bill-of-materials.json'"
go get -v -u github.com/coreos/license-bill-of-materials

rm -rf ./gopath
mkdir ./gopath

mv ./cmd/vendor ./gopath/src

GOPATH=`pwd`/gopath license-bill-of-materials \
--override-file ./bill-of-materials.override.json \
github.com/coreos/etcd github.com/coreos/etcd/etcdctl > bill-of-materials.json

mv ./gopath/src ./cmd/vendor
rm -rf ./gopath

echo "bill-of-materials is finished"

0 comments on commit 353dfa6

Please sign in to comment.