Skip to content

Commit

Permalink
doc(report): add license notice docs
Browse files Browse the repository at this point in the history
  • Loading branch information
xizhao committed Mar 6, 2018
1 parent 21f29ad commit d090cfd
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 1 deletion.
80 changes: 80 additions & 0 deletions NOTICE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# 3rd-Party License Notices

Generated by fossa-cli (https://github.com/fossas/fossa-cli)

This software includes the following software and licenses:

========================================================================
UNRECOGNIZED
========================================================================

The following software have components provided under the terms of this license:

- go-diff (from https://github.com/sergi/go-diff)
- go-github (from https://github.com/google/go-github)
- go-querystring (from https://github.com/google/go-querystring)

========================================================================
Do What The F*ck You Want To Public License (WTFPL)
========================================================================

The following software have components provided under the terms of this license:

- toml (from https://github.com/BurntSushi/toml)

========================================================================
Creative Commons Attribution 3.0 Unported (CC-BY)
========================================================================

The following software have components provided under the terms of this license:

- go-github (from https://github.com/google/go-github)

========================================================================
MIT License (Expat)
========================================================================

The following software have components provided under the terms of this license:

- semver (from https://github.com/blang/semver)
- doublestar (from https://github.com/bmatcuk/doublestar)
- color (from https://github.com/fatih/color)
- go-update (from https://github.com/inconshreveable/go-update)
- go-context (from https://github.com/jbenet/go-context)
- depth (from https://github.com/KyleBanks/depth)
- go-colorable (from https://github.com/mattn/go-colorable)
- go-isatty (from https://github.com/mattn/go-isatty)
- go-homedir (from https://github.com/mitchellh/go-homedir)
- go-diff (from https://github.com/sergi/go-diff)
- go-gitconfig (from https://github.com/tcnksm/go-gitconfig)
- ssh_config (from https://github.com/kevinburke/ssh_config)
- go-buffruneio (from https://github.com/pelletier/go-buffruneio)
- go-github-selfupdate (from https://github.com/rhysd/go-github-selfupdate)
- cli (from https://github.com/urfave/cli)
- ssh-agent (from https://github.com/xanzy/ssh-agent)

========================================================================
Apache License 2.0 (Apache-2.0)
========================================================================

The following software have components provided under the terms of this license:

- spinner (from https://github.com/briandowns/spinner)
- go-update (from https://github.com/inconshreveable/go-update)
- go-diff (from https://github.com/sergi/go-diff)
- ssh-agent (from https://github.com/xanzy/ssh-agent)

========================================================================
BSD 3-Clause License (Revised)
========================================================================

The following software have components provided under the terms of this license:

- go-update (from https://github.com/inconshreveable/go-update)
- gcfg (from https://github.com/src-d/gcfg)
- toml (from https://github.com/BurntSushi/toml)
- go-github (from https://github.com/google/go-github)
- go-querystring (from https://github.com/google/go-querystring)
- go-logging (from https://github.com/op/go-logging)
- xz (from https://github.com/ulikunitz/xz)

12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ FOSSA_API_KEY=YOUR_API_KEY_HERE fossa

## Integrating with CI

### Testing for License Violations
If you've integrated with https://fossa.io, you can use `fossa test` to fail builds against your FOSSA scan status.

```bash
Expand All @@ -127,6 +128,17 @@ If you've integrated with https://fossa.io, you can use `fossa test` to fail bui
FOSSA_API_KEY=YOUR_API_KEY_HERE fossa test
```

### Generating License Notices

To generate a license notice with each CI build, you can use the `fossa report` command:

```bash
# write a license notice to NOTICE.md
fossa report --type licenses > NOTICE.md
```

[See this repo's NOTICE file](NOTICE.md) for an example.

## Reference
Check out the [User Guide](docs/user-guide.md) for more details.

Expand Down
8 changes: 7 additions & 1 deletion cmd/fossa/report.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,13 @@ func reportLicenses(s *spinner.Spinner, endpoint, apiKey string, a analysis) {
}
}

fmt.Printf("This software includes the following software and licenses:\n\n")
fmt.Printf(`# 3rd-Party Software License Notice
Generated by fossa-cli (https://github.com/fossas/fossa-cli).
This software includes the following software and licenses:
`)
for license, deps := range depsByLicense {
fmt.Printf(`
========================================================================
Expand Down

0 comments on commit d090cfd

Please sign in to comment.