Use git-commit as ty playground version instead of 0.0.0 (#18314)

This commit is contained in:
Micha Reiser 2025-05-26 13:55:11 +02:00 committed by GitHub
parent e1b662bf5d
commit 5d93d619f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 104 additions and 4 deletions

View file

@ -23,6 +23,14 @@ use ty_project::{Db, ProjectDatabase};
use ty_python_semantic::Program;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
pub fn version() -> String {
option_env!("TY_WASM_COMMIT_SHORT_HASH")
.or_else(|| option_env!("CARGO_PKG_VERSION"))
.unwrap_or("unknown")
.to_string()
}
#[wasm_bindgen(start)]
pub fn run() {
use log::Level;