Skip to content

Commit

Permalink
Track Version in the Extension Code, for walkthrough. (#1051)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tatsinnit authored Nov 8, 2024
1 parent 4236e39 commit bf71899
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,20 @@ export async function activate(context: vscode.ExtensionContext) {

context.subscriptions.push(uiExtensionVariables.outputChannel);

registerUIExtensionVariables(uiExtensionVariables);
if (vscode.workspace.getConfiguration("workbench").get("startupEditor") !== "none") {
vscode.commands.executeCommand("workbench.action.openWalkthrough", {
const currentVersion = vscode.extensions.getExtension("ms-kubernetes-tools.vscode-aks-tools")?.packageJSON
.version;
const lastShownVersion = context.globalState.get<string>("vscode-aks-tools.lastWalkthroughVersion");
// Check if the walkthrough needs to be shown
if (currentVersion && currentVersion !== lastShownVersion) {
await vscode.commands.executeCommand("workbench.action.openWalkthrough", {
category: "ms-kubernetes-tools.vscode-aks-tools#aksvscodewalkthrough",
});

// Update the version in global state after showing the walkthrough
await context.globalState.update("vscode-aks-tools.lastWalkthroughVersion", currentVersion);
}

registerUIExtensionVariables(uiExtensionVariables);
registerCommandWithTelemetry("aks.signInToAzure", signInToAzure);
registerCommandWithTelemetry("aks.selectTenant", selectTenant);
registerCommandWithTelemetry("aks.selectSubscriptions", selectSubscriptions);
Expand Down

0 comments on commit bf71899

Please sign in to comment.