Skip to content

Commit

Permalink
Use gtm verify, update to gtm version 1.2.1 (#11)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
mschenk42 authored and nexus-uw committed Nov 27, 2016
1 parent 0e616de commit 00332fc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vscode-gtm",
"displayName": "vscode-gtm",
"description": "VSCode plugin to support Git Time Metrics",
"version": "0.1.1",
"version": "0.1.2",
"publisher": "s3ramsay",
"license": "MIT",
"engines": {
Expand Down Expand Up @@ -32,4 +32,4 @@
"typescript": "^1.8.5",
"vscode": "^0.11.0"
}
}
}
7 changes: 3 additions & 4 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,12 @@ function run_cmd(cmd: string, args: string[]): Promise<Result> {
child.on('close', (code: number) => resolve(<Result>{ code, output }));
});
}

export function activate(context: vscode.ExtensionContext) {
// check if gtm is installed + available
run_cmd('gtm', ['-v'])
run_cmd('gtm', ['verify', '>= 1.2.1'])
.then((res: Result) => {
if(res.output < 'v1.0.0'){
vscode.window.showWarningMessage('Installed gtm version is below v1.0.0. Please update your gtm installation.');
if(res.output != 'true'){
vscode.window.showWarningMessage('Installed gtm version is below v1.2.1. Please update your gtm installation.');
}
}, (res: Result) => {
if (res.code < 0) {
Expand Down

0 comments on commit 00332fc

Please sign in to comment.