Skip to content

Commit 00332fc

Browse files
mschenk42nexus-uw
authored andcommitted
Use gtm verify, update to gtm version 1.2.1 (#11)
* Use gtm verify, update to gtm version 1.2.1 * Check if result code is less than zero instead of equal to * Update constraint to >= to version
1 parent 0e616de commit 00332fc

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "vscode-gtm",
33
"displayName": "vscode-gtm",
44
"description": "VSCode plugin to support Git Time Metrics",
5-
"version": "0.1.1",
5+
"version": "0.1.2",
66
"publisher": "s3ramsay",
77
"license": "MIT",
88
"engines": {
@@ -32,4 +32,4 @@
3232
"typescript": "^1.8.5",
3333
"vscode": "^0.11.0"
3434
}
35-
}
35+
}

src/extension.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,12 @@ function run_cmd(cmd: string, args: string[]): Promise<Result> {
2121
child.on('close', (code: number) => resolve(<Result>{ code, output }));
2222
});
2323
}
24-
2524
export function activate(context: vscode.ExtensionContext) {
2625
// check if gtm is installed + available
27-
run_cmd('gtm', ['-v'])
26+
run_cmd('gtm', ['verify', '>= 1.2.1'])
2827
.then((res: Result) => {
29-
if(res.output < 'v1.0.0'){
30-
vscode.window.showWarningMessage('Installed gtm version is below v1.0.0. Please update your gtm installation.');
28+
if(res.output != 'true'){
29+
vscode.window.showWarningMessage('Installed gtm version is below v1.2.1. Please update your gtm installation.');
3130
}
3231
}, (res: Result) => {
3332
if (res.code < 0) {

0 commit comments

Comments
 (0)