Skip to content

Commit 09769dd

Browse files
authored
Merge pull request #170 from NativeScript/iiivanov/print-build-info
Print version info
2 parents 250ddf3 + 87c067c commit 09769dd

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/main.ts

+14
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ export function activate(context: vscode.ExtensionContext) {
2424
vscode.window.showErrorMessage(cliVersion.errorMessage);
2525
}
2626

27+
logInfo(cliVersion.version.toString());
28+
2729
let runCommand = (project: Project) => {
2830
if (vscode.workspace.rootPath === undefined) {
2931
vscode.window.showErrorMessage('No workspace opened.');
@@ -68,6 +70,18 @@ export function activate(context: vscode.ExtensionContext) {
6870
context.subscriptions.push(runAndroidCommand);
6971
}
7072

73+
function logInfo(cliVersion: string) {
74+
let channel = vscode.window.createOutputChannel("NativeScript Extension");
75+
const packageJSON = vscode.extensions.getExtension("Telerik.nativescript").packageJSON;
76+
77+
packageJSON.version && channel.appendLine(`Version: ${packageJSON.version}`);
78+
packageJSON.buildVersion && channel.appendLine(`Build version: ${packageJSON.buildVersion}`);
79+
packageJSON.commitId && channel.appendLine(`Commit id: ${packageJSON.commitId}`);
80+
channel.appendLine(`NativeScript CLI: ${cliVersion}`);
81+
82+
channel.show();
83+
}
84+
7185
export function deactivate() {
7286
Services.extensionServer().stop();
7387
}

0 commit comments

Comments
 (0)