File: updatebom.sh

package info (click to toggle)
etcd 3.2.26%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 9,620 kB
  • sloc: sh: 2,191; makefile: 729
file content (28 lines) | stat: -rwxr-xr-x 666 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/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

echo "setting up GOPATH"
rm -rf ./gopath
mkdir ./gopath
mv ./cmd/vendor ./gopath/src

echo "generating bill-of-materials.json"
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

echo "reverting GOPATH,vendor"
mv ./gopath/src ./cmd/vendor
rm -rf ./gopath

echo "generated bill-of-materials.json"