Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scripts: add 'BOM' update script #7897

Merged
merged 1 commit into from
May 9, 2017
Merged

scripts: add 'BOM' update script #7897

merged 1 commit into from
May 9, 2017

Conversation

gyuho
Copy link
Contributor

@gyuho gyuho commented May 8, 2017

Need this script when we add external dependencies.

c.f. #7896

@gyuho gyuho requested a review from heyitsanthony May 8, 2017 22:32

echo "updating 'bill-of-materials.json'"
go get -d -u github.com/coreos/license-bill-of-materials
SHA_BOM="61fa1b0553b9fc2ddf8d292e03f405abdc3f6ac7"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably shouldn't hardcode the SHA since this might mask BOM bugs and CI uses master

go get -v -u github.com/coreos/license-bill-of-materials

# TODO: remove 5 lines from "project": "github.com/coreos/etcd/cmd/etcd"
license-bill-of-materials \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mkdir gopath/
ln -s  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
rm -rf gopath

?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't seem to work with symlinks of symlinks?

rm -rf ./gopath
mkdir -p ./gopath
ln -s ./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

Will try other commands as well

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2017/05/08 16:01:06 can't load package: package github.com/coreos/etcd: cannot find package "github.com/coreos/etcd" in any of:
	/usr/local/go/src/github.com/coreos/etcd (from $GOROOT)
	/Users/gyuho/go/src/github.com/coreos/etcd/gopath/src/github.com/coreos/etcd (from $GOPATH)
can't load package: package github.com/coreos/etcd/etcdctl: cannot find package "github.com/coreos/etcd/etcdctl" in any of:
	/usr/local/go/src/github.com/coreos/etcd/etcdctl (from $GOROOT)
	/Users/gyuho/go/src/github.com/coreos/etcd/gopath/src/github.com/coreos/etcd/etcdctl (from $GOPATH)

@fanminshi
Copy link
Member

Checking bill of materials...
2a3,7
> 		"project": "bitbucket.org/ww/goautoneg",
> 		"license": "BSD 3-clause \"New\" or \"Revised\" License",
> 		"confidence": 1
> 	},
> 	{
205,209d209
< 		"confidence": 1
< 	},
< 	{
< 		"project": "bitbucket.org/ww/goautoneg",
< 		"license": "BSD 3-clause \"New\" or \"Revised\" License",
vendored licenses do not match given bill of materials

via https://travis-ci.org/coreos/etcd/jobs/230138438

Need this script when we add external dependencies.

Signed-off-by: Gyu-Ho Lee <[email protected]>
@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (master@aac2292). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #7897   +/-   ##
=========================================
  Coverage          ?   75.81%           
=========================================
  Files             ?      332           
  Lines             ?    26285           
  Branches          ?        0           
=========================================
  Hits              ?    19928           
  Misses            ?     4940           
  Partials          ?     1417

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aac2292...8c9f01e. Read the comment docs.

@gyuho
Copy link
Contributor Author

gyuho commented May 9, 2017

PTAL.

This should fix the current Travis failures.

@heyitsanthony
Copy link
Contributor

lgtm thanks

@gyuho gyuho merged commit 01a985e into etcd-io:master May 9, 2017
@gyuho gyuho deleted the bom branch May 9, 2017 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants