File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -101,6 +101,8 @@ enum Commands {
101101 #[ clap( value_name = "SCRIPT_API_FILE" , index = 1 ) ]
102102 input : PathBuf ,
103103 } ,
104+ /// Print the version of this executable
105+ Version ,
104106}
105107
106108fn main ( ) -> Result < ( ) > {
@@ -220,6 +222,9 @@ fn main() -> Result<()> {
220222
221223 println ! ( "{res}" ) ;
222224 }
225+ Commands :: Version => {
226+ println ! ( "{}" , env!( "CARGO_PKG_VERSION" ) ) ;
227+ }
223228 }
224229
225230 Ok ( ( ) )
Original file line number Diff line number Diff line change @@ -21,6 +21,16 @@ function M.check()
2121 local bridge_path_ok , bridge_path = pcall (sidecar .find_bridge_path , require (" defold" ).plugin_root ())
2222 if bridge_path_ok then
2323 vim .health .ok (string.format (" Bridge Path: %s" , bridge_path ))
24+
25+ local bridge_version_ok , bridge_version = pcall (function ()
26+ return vim .fn .system { bridge_path , " version" }
27+ end )
28+
29+ if bridge_version_ok then
30+ vim .health .ok (string.format (" Bridge Version: %s" , vim .trim (bridge_version )))
31+ else
32+ vim .health .error (string.format (" Bridge Version: Could not get version: %s" , bridge_version ))
33+ end
2434 else
2535 vim .health .error (string.format (" Bridge Not Found: %s" , bridge_path ))
2636 end
You can’t perform that action at this time.
0 commit comments