Added complete scripts for generating third party license files
This commit is contained in:
parent
9d58032064
commit
d060114f00
65 changed files with 143 additions and 27 deletions
|
@ -1,17 +0,0 @@
|
|||
//usr/bin/env rustc $0 -o a.out && ./a.out ; rm -f ./a.out ; exit
|
||||
|
||||
fn main() {
|
||||
println!("Hello world");
|
||||
|
||||
|
||||
}
|
||||
|
||||
// Next steps:
|
||||
// 1a. Add wiring in Zed to check for a licenses markdown file
|
||||
// 1b. Add wiring in Zed.dev for builds to publish licenses alongside releases as well as licenses for Zed.dev itself
|
||||
// (e.g. https://github.com/zed-industries/zed.dev/tree/main/content/licenses)
|
||||
// 2. Figure out how to run those commands and get the license text for each MIT and Apache licensed software
|
||||
// 3. Add in the configuration file:
|
||||
// a. and refactor this script to have types of licenses
|
||||
// b. add callback handlers for each type,
|
||||
// c. check if the handler succeeds
|
10
script/generate-licenses
Executable file
10
script/generate-licenses
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
cargo about generate --workspace -o assets/licenses.md -c script/licenses/zed-licenses.toml script/licenses/template.hbs.md
|
||||
|
||||
# cargo about automatically html-escapes all output, so we need to undo it here:
|
||||
sed -i '' 's/"/"/g' assets/licenses.md
|
||||
sed -i '' 's/'/'\''/g' assets/licenses.md # `'\''` ends the string, appends a single quote, and re-opens the string
|
||||
sed -i '' 's/=/=/g' assets/licenses.md
|
||||
sed -i '' 's/`/`/g' assets/licenses.md
|
||||
sed -i '' 's/</</g' assets/licenses.md
|
||||
sed -i '' 's/>/>/g' assets/licenses.md
|
27
script/licenses/template.hbs.md
Normal file
27
script/licenses/template.hbs.md
Normal file
|
@ -0,0 +1,27 @@
|
|||
# Third Party Licenses
|
||||
|
||||
This page lists the licenses of the projects used in Zed.
|
||||
|
||||
## Overview of licenses:
|
||||
|
||||
{{#each overview}}
|
||||
* {{name}} ({{count}})
|
||||
{{/each}}
|
||||
|
||||
## All license texts:
|
||||
|
||||
{{#each licenses}}
|
||||
|
||||
### {{name}}
|
||||
|
||||
#### Used by:
|
||||
|
||||
{{#each used_by}}
|
||||
* [{{crate.name}} {{crate.version}}]({{#if crate.repository}} {{crate.repository}} {{else}} https://crates.io/crates/{{crate.name}} {{/if}})
|
||||
{{/each}}
|
||||
|
||||
{{text}}
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
{{/each}}
|
37
script/licenses/zed-licenses.toml
Normal file
37
script/licenses/zed-licenses.toml
Normal file
|
@ -0,0 +1,37 @@
|
|||
no-clearly-defined = true
|
||||
private = { ignore = true }
|
||||
accepted = [
|
||||
"Apache-2.0",
|
||||
"MIT",
|
||||
"Apache-2.0 WITH LLVM-exception",
|
||||
"MPL-2.0",
|
||||
"BSD-3-Clause",
|
||||
"BSD-2-Clause",
|
||||
"ISC",
|
||||
"CC0-1.0",
|
||||
"Unicode-DFS-2016",
|
||||
"OpenSSL",
|
||||
"Zlib",
|
||||
]
|
||||
workarounds = [
|
||||
"ring",
|
||||
"wasmtime",
|
||||
]
|
||||
|
||||
[procinfo.clarify]
|
||||
license = "MIT"
|
||||
[[procinfo.clarify.git]]
|
||||
path = 'LICENSE.md'
|
||||
checksum = '37db33bbbd7348969eda397b89a16f252d56c1ca7481b6ccaf56ccdcbab5dcca'
|
||||
|
||||
[webpki.clarify]
|
||||
license = "ISC" # It actually says 'ISC-style' but I don't know the SPDX expression for that.
|
||||
[[webpki.clarify.files]]
|
||||
path = 'LICENSE'
|
||||
checksum = '5b698ca13897be3afdb7174256fa1574f8c6892b8bea1a66dd6469d3fe27885a'
|
||||
|
||||
[fuchsia-cprng.clarify]
|
||||
license = "BSD-3-Clause"
|
||||
[[fuchsia-cprng.clarify.files]]
|
||||
path = 'LICENSE'
|
||||
checksum = '03b114f53e6587a398931762ee11e2395bfdba252a329940e2c8c9e81813845b'
|
Loading…
Add table
Add a link
Reference in a new issue