mirror of
https://github.com/o2sh/onefetch
synced 2024-07-02 15:48:51 +00:00
rollback to static license cache
This commit is contained in:
parent
a2f6352864
commit
5455efeeb0
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -13,6 +13,3 @@
|
|||
|
||||
# nix result from nix-build
|
||||
result
|
||||
|
||||
# generated license cache
|
||||
resources/licenses/cache.bin.gz
|
||||
|
|
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -1,3 +0,0 @@
|
|||
[submodule "resources/licenses/spdx"]
|
||||
path = resources/licenses/spdx
|
||||
url = https://github.com/spdx/license-list-data
|
23
build.rs
23
build.rs
|
@ -1,23 +0,0 @@
|
|||
extern crate askalono;
|
||||
|
||||
use std::fs::File;
|
||||
use std::path::Path;
|
||||
|
||||
use askalono::Store;
|
||||
|
||||
const EMBEDDED_CACHE: &str = "resources/licenses/cache.bin.gz";
|
||||
|
||||
fn main() {
|
||||
if Path::new(EMBEDDED_CACHE).exists() {
|
||||
println!("cargo:warning=onefetch license cache file already exists; not re-building");
|
||||
return;
|
||||
}
|
||||
|
||||
let mut store = Store::new();
|
||||
store
|
||||
.load_spdx(Path::new("resources/licenses/spdx/json/details"), false)
|
||||
.expect("Couldn't create a store from SPDX data. Have submodules been initialized?");
|
||||
|
||||
let mut cache = File::create(EMBEDDED_CACHE).unwrap();
|
||||
store.to_cache(&mut cache).unwrap();
|
||||
}
|
BIN
resources/licenses/cache.bin.gz
Normal file
BIN
resources/licenses/cache.bin.gz
Normal file
Binary file not shown.
|
@ -1 +0,0 @@
|
|||
Subproject commit 5f2f40350a86e05ac332a0c62d6f6bb128dac9dc
|
Loading…
Reference in New Issue
Block a user