mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Exclude version numbers from cargo/licenses.json
Version numbers are not required by the license, and keeping them in means the build breaks after merging in a dependabot update.
This commit is contained in:
parent
37f7872565
commit
e676e1a484
5 changed files with 2589 additions and 3213 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -3959,6 +3959,7 @@ dependencies = [
|
||||||
"anki_process",
|
"anki_process",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"camino",
|
"camino",
|
||||||
|
"serde_json",
|
||||||
"walkdir",
|
"walkdir",
|
||||||
"which",
|
"which",
|
||||||
]
|
]
|
||||||
|
|
|
@ -169,7 +169,7 @@ fn build_rsbridge(build: &mut Build) -> Result<()> {
|
||||||
|
|
||||||
pub fn check_rust(build: &mut Build) -> Result<()> {
|
pub fn check_rust(build: &mut Build) -> Result<()> {
|
||||||
let inputs = inputs![
|
let inputs = inputs![
|
||||||
glob!("{rslib/**,pylib/rsbridge/**,ftl/**,build/**,qt/launcher/**}"),
|
glob!("{rslib/**,pylib/rsbridge/**,ftl/**,build/**,qt/launcher/**,tools/minilints/**}"),
|
||||||
"Cargo.lock",
|
"Cargo.lock",
|
||||||
"Cargo.toml",
|
"Cargo.toml",
|
||||||
"rust-toolchain.toml",
|
"rust-toolchain.toml",
|
||||||
|
|
5782
cargo/licenses.json
5782
cargo/licenses.json
File diff suppressed because it is too large
Load diff
|
@ -12,5 +12,6 @@ anki_io.workspace = true
|
||||||
anki_process.workspace = true
|
anki_process.workspace = true
|
||||||
anyhow.workspace = true
|
anyhow.workspace = true
|
||||||
camino.workspace = true
|
camino.workspace = true
|
||||||
|
serde_json.workspace = true
|
||||||
walkdir.workspace = true
|
walkdir.workspace = true
|
||||||
which.workspace = true
|
which.workspace = true
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
|
|
||||||
use std::cell::LazyCell;
|
use std::cell::LazyCell;
|
||||||
|
use std::collections::BTreeMap;
|
||||||
use std::collections::HashSet;
|
use std::collections::HashSet;
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::fs;
|
use std::fs;
|
||||||
|
@ -267,5 +268,16 @@ fn generate_licences() -> Result<String> {
|
||||||
"--manifest-path",
|
"--manifest-path",
|
||||||
"rslib/Cargo.toml",
|
"rslib/Cargo.toml",
|
||||||
])?;
|
])?;
|
||||||
Ok(output.stdout)
|
|
||||||
|
let licenses: Vec<BTreeMap<String, serde_json::Value>> = serde_json::from_str(&output.stdout)?;
|
||||||
|
|
||||||
|
let filtered: Vec<BTreeMap<String, serde_json::Value>> = licenses
|
||||||
|
.into_iter()
|
||||||
|
.map(|mut entry| {
|
||||||
|
entry.remove("version");
|
||||||
|
entry
|
||||||
|
})
|
||||||
|
.collect();
|
||||||
|
|
||||||
|
Ok(serde_json::to_string_pretty(&filtered)?)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue