diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-03-13 13:22:25 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-03-13 13:22:25 +0000 |
commit | ceffcf8a11d0482e789cac6be1fd801a751ea10c (patch) | |
tree | 01900d736236e38f398bc59f27196df0f32f2170 /editors/code/src | |
parent | fe4a94fff379e69acf31bf4c8b0d2490107a2dae (diff) | |
parent | 88ef0541a5110563f3f2e92532da37209d264ad9 (diff) |
Merge #7984
7984: Improve version display r=matklad a=lnicola
Maybe closes #7854
The version string for unreleased builds looks like this now:
```
$ rust-analyzer --version
rust-analyzer 2021-03-08-159-gc0459c535
```
Release builds should only have the tag name (`2021-03-15`).
Co-authored-by: Laurențiu Nicola <[email protected]>
Diffstat (limited to 'editors/code/src')
-rw-r--r-- | editors/code/src/commands.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/editors/code/src/commands.ts b/editors/code/src/commands.ts index 283b9a160..3e96fbad8 100644 --- a/editors/code/src/commands.ts +++ b/editors/code/src/commands.ts | |||
@@ -253,11 +253,10 @@ export function ssr(ctx: Ctx): Cmd { | |||
253 | export function serverVersion(ctx: Ctx): Cmd { | 253 | export function serverVersion(ctx: Ctx): Cmd { |
254 | return async () => { | 254 | return async () => { |
255 | const { stdout } = spawnSync(ctx.serverPath, ["--version"], { encoding: "utf8" }); | 255 | const { stdout } = spawnSync(ctx.serverPath, ["--version"], { encoding: "utf8" }); |
256 | const commitHash = stdout.slice(`rust-analyzer `.length).trim(); | 256 | const versionString = stdout.slice(`rust-analyzer `.length).trim(); |
257 | const { releaseTag } = ctx.config.package; | ||
258 | 257 | ||
259 | void vscode.window.showInformationMessage( | 258 | void vscode.window.showInformationMessage( |
260 | `rust-analyzer version: ${releaseTag ?? "unreleased"} (${commitHash})` | 259 | `rust-analyzer version: ${versionString}` |
261 | ); | 260 | ); |
262 | }; | 261 | }; |
263 | } | 262 | } |