Skip to content

Commit

Permalink
Automated rollback of commit ab72246.
Browse files Browse the repository at this point in the history
*** Reason for rollback ***

Partial rollback because we need to migrate some folks before we can get the new functionality live.

*** Original change description ***

Support Xcode betas with xcode-locator

Previously if you had 2 builds of the same version of Xcode, for example
10.2.0 beta 1 and 10.2.0 beta 2, there was no way to disambiguate them.
This change appends the `ProductBuildVersion` of each Xcode version to
allow you to specify that if desired.

Closes #7371.

PiperOrigin-RevId: 234900481
  • Loading branch information
aragos authored and copybara-github committed Feb 21, 2019
1 parent cba0c63 commit be94831
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions tools/osx/xcode_locator.m
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,6 @@ static void AddEntryToDictionary(
NSLog(@"Version strings for %@: short=%@, expanded=%@",
url, version, expandedVersion);

NSURL *versionPlistUrl = [url URLByAppendingPathComponent:@"Contents/version.plist"];
NSDictionary *versionPlistContents = [[NSDictionary alloc] initWithContentsOfURL:versionPlistUrl
error:nil];
NSString *productVersion = [versionPlistContents objectForKey:@"ProductBuildVersion"];
if (productVersion) {
expandedVersion = [expandedVersion stringByAppendingFormat:@".%@", productVersion];
}

NSURL *developerDir =
[url URLByAppendingPathComponent:@"Contents/Developer"];
XcodeVersionEntry *entry =
Expand Down Expand Up @@ -267,6 +259,12 @@ int main(int argc, const char * argv[]) {
versionArg = @"";
} else {
versionArg = firstArg;
NSCharacterSet *versSet =
[NSCharacterSet characterSetWithCharactersInString:@"0123456789."];
if ([versionArg rangeOfCharacterFromSet:versSet.invertedSet].length
!= 0) {
versionArg = nil;
}
}
}
if (versionArg == nil) {
Expand Down

0 comments on commit be94831

Please sign in to comment.