mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-26 03:55:07 +08:00
Merge #161
161: put mini-dashboard in out-dir r=MarinPostma a=MarinPostma This PR puts the mini-dashboard during build in the `OUT_DIR` specified by cargo. This allow the mini-dashboard artifacts to be cleaned when `cargo clean` is ran, and not pollute the working directory with unwanted files. Co-authored-by: Marin Postma <postma.marin@protonmail.com>
This commit is contained in:
commit
d34d7cbc37
2
.gitignore
vendored
2
.gitignore
vendored
@ -5,5 +5,3 @@
|
|||||||
/*.mdb
|
/*.mdb
|
||||||
/query-history.txt
|
/query-history.txt
|
||||||
/data.ms
|
/data.ms
|
||||||
/meilisearch-http/mini-dashboard
|
|
||||||
/meilisearch-http/.mini-dashboard.sha1
|
|
||||||
|
@ -28,9 +28,10 @@ mod mini_dashboard {
|
|||||||
pub fn setup_mini_dashboard() -> anyhow::Result<()> {
|
pub fn setup_mini_dashboard() -> anyhow::Result<()> {
|
||||||
let cargo_manifest_dir = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap());
|
let cargo_manifest_dir = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap());
|
||||||
let cargo_toml = cargo_manifest_dir.join("Cargo.toml");
|
let cargo_toml = cargo_manifest_dir.join("Cargo.toml");
|
||||||
|
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());
|
||||||
|
|
||||||
let sha1_path = cargo_manifest_dir.join(".mini-dashboard.sha1");
|
let sha1_path = out_dir.join(".mini-dashboard.sha1");
|
||||||
let dashboard_dir = cargo_manifest_dir.join("mini-dashboard");
|
let dashboard_dir = out_dir.join("mini-dashboard");
|
||||||
|
|
||||||
let manifest = Manifest::from_path(cargo_toml).unwrap();
|
let manifest = Manifest::from_path(cargo_toml).unwrap();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user