[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 golang/vscode-go#1179

Change-Id: I77b26fb0249847556adcac08a05a6d6f75377ee5
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/289191
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Robert Findley <rfindley@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
(cherry picked from commit 6841fe054a966cd5ad92930b7eda7a97d13af633)
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/289235
diff --git a/src/goMain.ts b/src/goMain.ts
index 54a0166..68efce9 100644
--- a/src/goMain.ts
+++ b/src/goMain.ts
@@ -578,15 +578,16 @@
 	// Update this list of versions when there is a new version where we want to
 	// show the welcome page on update.
 	const showVersions: string[] = ['0.22.0'];
-
+	// TODO(hyangah): use the content hash instead of hard-coded string.
+	// https://github.com/golang/vscode-go/issue/1179
+	let goExtensionVersion = 'v0.22.0';
 	let goExtensionVersionKey = 'go.extensionVersion';
 	if (isInPreviewMode()) {
+		goExtensionVersion = '0.0.0';
 		goExtensionVersionKey = 'go.nightlyExtensionVersion';
 	}
 
-	const goExtension = vscode.extensions.getExtension(extensionId)!;
-	const goExtensionVersion = goExtension.packageJSON.version;
-	const savedGoExtensionVersion = getFromGlobalState(goExtensionVersionKey, '0.0.0');
+	const savedGoExtensionVersion = getFromGlobalState(goExtensionVersionKey, '');
 
 	if (shouldShowGoWelcomePage(showVersions, goExtensionVersion, savedGoExtensionVersion)) {
 		WelcomePanel.createOrShow(ctx.extensionUri);