Skip to content

Instantly share code, notes, and snippets.

@sehqlr
Last active December 8, 2015 19:05
Show Gist options
  • Save sehqlr/faa63c83c2eb2af3f8e8 to your computer and use it in GitHub Desktop.
Save sehqlr/faa63c83c2eb2af3f8e8 to your computer and use it in GitHub Desktop.
License Aggregator Tool

Licence Aggregator Tool

This is an idea for a tool that would aggregate licences from multiple repos into a single license statement. I came up with this after thinking about Mantl issue 858.

The initial design is that there would be a license.yml file in the root of the repository that lists the licenses that need to be included in the project, and a script that generates a LICENSE file based on the configuration.

I'm fishing for other ideas, so please, feel free to contribute!

@BrianHicks
Copy link

I'm thinking of a few steps, basically:

  1. grab all the repos specified in license.yml
  2. look for license text in each of them (the standard place is LICENSE, possibly with an extension)
  3. do something with the licenses once a dictionary of repo -> license is created.

That something could vary:

  • create a colophon of projects used plus their licenses, in a templated way.
  • do linting based on your intended usage. For example, a GPL licensed dependency necessarily infects the downstream repos. If you're planning to release an app with the dependency, you've gotta make the code available. These on a per-license basis.
  • suggest a license for your code to use.

@stevendborrelli
Copy link

I like this idea....just the idea of a license.yml file going in every repo makes a lot of sense.

What would it look like?

component:
  url: http://github.com....
  license_url: http://github.com/xxx/license.md
  license_type: Apache 2.0

Other ideas:

  • scan go import paths to generate a license.yml file automatically.

@sehqlr
Copy link
Author

sehqlr commented Dec 8, 2015

So, in case anyone is looking at this, I have finished out a very basic prototype of this in my repo https://github.com/sehqlr/license-bureau

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment