Skip to content

Commit 88a972d

Browse files
committed
[release] src/goMain: use a hard-coded version string for welcome page state
This is to show the welcome page to users who just install v0.22.1 without installing v0.22.0, while preventing from showing it to users who upgrade from v0.22.0. Updates #1179 Change-Id: I77b26fb0249847556adcac08a05a6d6f75377ee5 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/289191 Trust: Hyang-Ah Hana Kim <[email protected]> Run-TryBot: Hyang-Ah Hana Kim <[email protected]> Reviewed-by: Robert Findley <[email protected]> TryBot-Result: kokoro <[email protected]> (cherry picked from commit 6841fe0) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/289235
1 parent f796ab1 commit 88a972d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/goMain.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -578,15 +578,16 @@ function showGoWelcomePage(ctx: vscode.ExtensionContext) {
578578
// Update this list of versions when there is a new version where we want to
579579
// show the welcome page on update.
580580
const showVersions: string[] = ['0.22.0'];
581-
581+
// TODO(hyangah): use the content hash instead of hard-coded string.
582+
// https://github.com/golang/vscode-go/issue/1179
583+
let goExtensionVersion = 'v0.22.0';
582584
let goExtensionVersionKey = 'go.extensionVersion';
583585
if (isInPreviewMode()) {
586+
goExtensionVersion = '0.0.0';
584587
goExtensionVersionKey = 'go.nightlyExtensionVersion';
585588
}
586589

587-
const goExtension = vscode.extensions.getExtension(extensionId)!;
588-
const goExtensionVersion = goExtension.packageJSON.version;
589-
const savedGoExtensionVersion = getFromGlobalState(goExtensionVersionKey, '0.0.0');
590+
const savedGoExtensionVersion = getFromGlobalState(goExtensionVersionKey, '');
590591

591592
if (shouldShowGoWelcomePage(showVersions, goExtensionVersion, savedGoExtensionVersion)) {
592593
WelcomePanel.createOrShow(ctx.extensionUri);

0 commit comments

Comments
 (0)