File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -39,8 +39,7 @@ fn set_rerun() {
39
39
}
40
40
41
41
fn rev ( ) -> Option < String > {
42
- let output = Command :: new ( "git" ) . args ( & [ "rev-parse " , "HEAD " ] ) . output ( ) . ok ( ) ?;
42
+ let output = Command :: new ( "git" ) . args ( & [ "describe " , "--tags " ] ) . output ( ) . ok ( ) ?;
43
43
let stdout = String :: from_utf8 ( output. stdout ) . ok ( ) ?;
44
- let short_hash = stdout. get ( 0 ..7 ) ?;
45
- Some ( short_hash. to_owned ( ) )
44
+ Some ( stdout)
46
45
}
Original file line number Diff line number Diff line change @@ -253,11 +253,10 @@ export function ssr(ctx: Ctx): Cmd {
253
253
export function serverVersion ( ctx : Ctx ) : Cmd {
254
254
return async ( ) => {
255
255
const { stdout } = spawnSync ( ctx . serverPath , [ "--version" ] , { encoding : "utf8" } ) ;
256
- const commitHash = stdout . slice ( `rust-analyzer ` . length ) . trim ( ) ;
257
- const { releaseTag } = ctx . config . package ;
256
+ const versionString = stdout . slice ( `rust-analyzer ` . length ) . trim ( ) ;
258
257
259
258
void vscode . window . showInformationMessage (
260
- `rust-analyzer version: ${ releaseTag ?? "unreleased" } ( ${ commitHash } ) `
259
+ `rust-analyzer version: ${ versionString } `
261
260
) ;
262
261
} ;
263
262
}
You can’t perform that action at this time.
0 commit comments