Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswayoub committed Jan 3, 2016
2 parents bed88ee + d84f17b commit c7843b4
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 19 deletions.
6 changes: 3 additions & 3 deletions Vagrant Manager.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
objects = {

/* Begin PBXBuildFile section */
2609ECF51BC89CEA00E4B44E /* NFSScanner.m in Sources */ = {isa = PBXBuildFile; fileRef = 2609ECF41BC89CEA00E4B44E /* NFSScanner.m */; settings = {ASSET_TAGS = (); }; };
2609ECF71BC8A04600E4B44E /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 2609ECF61BC8A04600E4B44E /* [email protected] */; settings = {ASSET_TAGS = (); }; };
2609ECF91BC8A05100E4B44E /* rdp.png in Resources */ = {isa = PBXBuildFile; fileRef = 2609ECF81BC8A05100E4B44E /* rdp.png */; settings = {ASSET_TAGS = (); }; };
2609ECF51BC89CEA00E4B44E /* NFSScanner.m in Sources */ = {isa = PBXBuildFile; fileRef = 2609ECF41BC89CEA00E4B44E /* NFSScanner.m */; };
2609ECF71BC8A04600E4B44E /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 2609ECF61BC8A04600E4B44E /* [email protected] */; };
2609ECF91BC8A05100E4B44E /* rdp.png in Resources */ = {isa = PBXBuildFile; fileRef = 2609ECF81BC8A05100E4B44E /* rdp.png */; };
26130E9A1B1D565200872C4F /* bm_status_icon_off.png in Resources */ = {isa = PBXBuildFile; fileRef = 26130E981B1D565200872C4F /* bm_status_icon_off.png */; };
26130E9B1B1D565200872C4F /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 26130E991B1D565200872C4F /* [email protected] */; };
26130E9E1B1D596400872C4F /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 26130E9C1B1D596400872C4F /* [email protected] */; };
Expand Down
30 changes: 16 additions & 14 deletions Vagrant Manager/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -274,26 +274,28 @@ - (void)checkForVagrantUpdates:(BOOL)showAlert {

BOOL newVersionAvailable = NO;
BOOL invalidOutput = YES;
NSString *currentVersion;
NSString *latestVersion;
NSString *currentVersion = nil;
NSString *latestVersion = nil;


if([lines count] >= 2) {
NSArray *installedVersionParts = [[lines objectAtIndex:0] componentsSeparatedByString:@","];
NSArray *latestVersionParts = [[lines objectAtIndex:1] componentsSeparatedByString:@","];
for(NSString *line in lines) {
NSArray *cols = [line componentsSeparatedByString:@","];

if([installedVersionParts count] >= 4 && [latestVersionParts count] >= 4) {
currentVersion = [installedVersionParts objectAtIndex:3];
latestVersion = [latestVersionParts objectAtIndex:3];

if([Util compareVersion:currentVersion toVersion:latestVersion] == NSOrderedAscending) {
newVersionAvailable = YES;
if([cols count] >=4 ) {
if([[cols objectAtIndex:2] isEqualToString:@"version-installed"]) {
currentVersion = [cols objectAtIndex:3];
} else if([[cols objectAtIndex:2] isEqualToString:@"version-latest"]) {
latestVersion = [cols objectAtIndex:3];
}

invalidOutput = NO;
}
}

if(currentVersion && latestVersion) {
newVersionAvailable = [Util compareVersion:currentVersion toVersion:latestVersion] == NSOrderedAscending;
invalidOutput = NO;
} else {
invalidOutput = YES;
}

dispatch_async(dispatch_get_main_queue(), ^{
[[NSNotificationCenter defaultCenter] postNotificationName:@"vagrant-manager.vagrant-update-available" object:nil userInfo:@{@"is_update_available": [NSNumber numberWithBool:newVersionAvailable]}];

Expand Down
4 changes: 2 additions & 2 deletions Vagrant Manager/Vagrant Manager-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.5.0</string>
<string>2.5.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2.5.0</string>
<string>2.5.1</string>
<key>Configuration</key>
<string>${CONFIGURATION}</string>
<key>LSApplicationCategoryType</key>
Expand Down

0 comments on commit c7843b4

Please sign in to comment.