chore: include versions of all packages in /info
parent
ea7a5e6f18
commit
c8ec3e03cd
|
@ -37,6 +37,7 @@ nonempty = "0.6.0"
|
|||
|
||||
wasm-bindgen = { version = "0.2", optional = true }
|
||||
|
||||
shadow-rs = "0.17"
|
||||
|
||||
[build-dependencies]
|
||||
shadow-rs = "0.17"
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
fn main() -> shadow_rs::SdResult<()> {
|
||||
shadow_rs::new()
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
use shadow_rs::shadow;
|
||||
|
||||
shadow!(build);
|
|
@ -2,8 +2,9 @@
|
|||
extern crate lazy_static;
|
||||
|
||||
pub mod addressing;
|
||||
pub mod common;
|
||||
pub mod constants;
|
||||
pub mod entry;
|
||||
pub mod hash;
|
||||
pub mod error;
|
||||
pub mod hash;
|
||||
pub mod lang;
|
||||
|
|
|
@ -819,7 +819,12 @@ pub async fn get_info(state: web::Data<State>) -> Result<HttpResponse, Error> {
|
|||
Ok(HttpResponse::Ok().json(json!({
|
||||
"name": state.config.vault_name,
|
||||
// "location": &*state.store.path,
|
||||
"version": build::PKG_VERSION,
|
||||
"version": format!(
|
||||
"{} / {} / {}",
|
||||
upend_base::common::build::PKG_VERSION,
|
||||
upend_db::common::build::PKG_VERSION,
|
||||
build::PKG_VERSION
|
||||
),
|
||||
"desktop": state.config.desktop_enabled
|
||||
})))
|
||||
}
|
||||
|
@ -948,7 +953,15 @@ mod tests {
|
|||
let info: VaultInfo = actix_web::test::call_and_read_body_json(&app, req).await;
|
||||
|
||||
assert_eq!(info.name, Some("TEST VAULT".to_string()));
|
||||
assert_eq!(info.version, format!("{}", build::PKG_VERSION));
|
||||
assert_eq!(
|
||||
info.version,
|
||||
format!(
|
||||
"{} / {} / {}",
|
||||
upend_base::common::build::PKG_VERSION,
|
||||
upend_db::common::build::PKG_VERSION,
|
||||
build::PKG_VERSION
|
||||
)
|
||||
);
|
||||
assert!(!info.desktop);
|
||||
}
|
||||
|
||||
|
|
|
@ -10,13 +10,13 @@ extern crate lazy_static;
|
|||
#[macro_use]
|
||||
mod macros;
|
||||
|
||||
pub mod common;
|
||||
pub mod engine;
|
||||
pub mod entry;
|
||||
pub mod hierarchies;
|
||||
pub mod jobs;
|
||||
pub mod stores;
|
||||
|
||||
mod common;
|
||||
mod inner;
|
||||
mod util;
|
||||
|
||||
|
|
Loading…
Reference in New Issue