ninenines / erlang.mk

A build tool for Erlang that just works.
https://erlang.mk
ISC License
578 stars 241 forks source link

Allow generating license information in `.app` #1001

Open paulo-ferraz-oliveira opened 3 months ago

paulo-ferraz-oliveira commented 3 months ago

As per what was discussed in https://github.com/ninenines/cowboy/issues/1651, this issue's goal is to be a reference for future discussion around implementing an erlang.mk "system" that allows populating .app with license information that can be used both by Hex.pm and rebar3_sbom, for example.

Example expectation

It could look something like

# erlang.mk
LICENSE = ISC

after which e.g. target ebin/$(PROJECT).app could generate output such as

{licenses, ["ISC"]}

Further considerations

The license information could be detected from an existing LICENSE file (as proposed by @essen in the linked issue) and extracted using licensee and jq. It should also be possible to cache this information (and read from the cache, when available) so as to not call the same "system" over and over at compile time.