fix(bindings): only include top level LICENSE file
Ref: tree-sitter/workflows#33
This commit is contained in:
parent
c3012a7d8a
commit
436162ae7c
2 changed files with 20 additions and 9 deletions
|
|
@ -373,14 +373,25 @@ pub fn generate_grammar_files(
|
|||
generate_file(path, BUILD_RS_TEMPLATE, language_name, &generate_opts)
|
||||
})?;
|
||||
|
||||
missing_path(repo_path.join("Cargo.toml"), |path| {
|
||||
generate_file(
|
||||
path,
|
||||
CARGO_TOML_TEMPLATE,
|
||||
dashed_language_name.as_str(),
|
||||
&generate_opts,
|
||||
)
|
||||
})?;
|
||||
missing_path_else(
|
||||
repo_path.join("Cargo.toml"),
|
||||
allow_update,
|
||||
|path| {
|
||||
generate_file(
|
||||
path,
|
||||
CARGO_TOML_TEMPLATE,
|
||||
dashed_language_name.as_str(),
|
||||
&generate_opts,
|
||||
)
|
||||
},
|
||||
|path| {
|
||||
let contents = fs::read_to_string(path)?;
|
||||
if contents.contains("\"LICENSE\"") {
|
||||
write_file(path, contents.replace("\"LICENSE\"", "\"/LICENSE\""))?;
|
||||
}
|
||||
Ok(())
|
||||
},
|
||||
)?;
|
||||
|
||||
Ok(())
|
||||
})?;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ include = [
|
|||
"queries/*",
|
||||
"src/*",
|
||||
"tree-sitter.json",
|
||||
"LICENSE",
|
||||
"/LICENSE",
|
||||
]
|
||||
|
||||
[lib]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue