Skip to content

Commit

Permalink
Release for #190 and #194
Browse files Browse the repository at this point in the history
  • Loading branch information
Shan Khan authored and Shan Khan committed Jan 31, 2017
1 parent cc6a29c commit cfc004f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "code-settings-sync",
"displayName": "Settings Sync",
"description": "Synchronize Settings, Snippets, launch, keybindings, workspaces and extensions Across Multiple Machines using Github Gist.",
"version": "2.4.2",
"version": "2.4.3",
"icon": "images/cloud.png",
"publisher": "Shan",
"author": {
Expand Down
18 changes: 13 additions & 5 deletions src/commons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ export class Commons {
message = "Sync : Internet Not Connected or Unable to Connect to Github. Exception Logged in Console";
msgBox = false;
}
if (error.code == 4) {
message = "Sync : Unable to Save Settings. Please make sure you have valid JSON settings.json file. ( e.g : No trailing commas )";
}
}
vscode.window.setStatusBarMessage("");

Expand Down Expand Up @@ -243,12 +246,17 @@ export class Commons {
else {
let settings: ExtensionConfig = await me.GetSettings();
if (settings.version == 0 || settings.version < Environment.CURRENT_VERSION) {
if (settings.version == 0) {
vscode.window.showInformationMessage("Sync : Settings Created");
}
let oldSettingVersion: number = settings.version;
settings.version = Environment.CURRENT_VERSION;
await me.SaveSettings(settings);
vscode.window.setStatusBarMessage("Sync : Settings Version Updated to v" + Environment.getVersion(), 2000);
let done: boolean = await me.SaveSettings(settings);
if (done == true) {
if (oldSettingVersion == 0) {
vscode.window.showInformationMessage("Sync : Settings Created");
}
else {
vscode.window.setStatusBarMessage("Sync : Settings Version Updated to v" + Environment.getVersion(), 2000);
}
}
}
}
resolve(true);
Expand Down
2 changes: 1 addition & 1 deletion src/environmentPath.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { OsType } from './enums';

export class Environment {

public static CURRENT_VERSION: number = 242;
public static CURRENT_VERSION: number = 243;
public static getVersion(): string {
var txt2 = Environment.CURRENT_VERSION.toString().slice(0, 1) + "." + Environment.CURRENT_VERSION.toString().slice(1,2)+ "." + Environment.CURRENT_VERSION.toString().slice(2,3);
return txt2;
Expand Down

0 comments on commit cfc004f

Please sign in to comment.