Skip to content

Commit

Permalink
Added secondary location check for pbxProject (#14588)
Browse files Browse the repository at this point in the history
  • Loading branch information
timothy-volvo authored May 18, 2021
1 parent e8006bb commit 0f4f7f7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Tasks/XcodeV5/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"author": "Microsoft Corporation",
"version": {
"Major": 5,
"Minor": 185,
"Minor": 188,
"Patch": 0
},
"releaseNotes": "This version of the task is compatible with Xcode 8 - 11. Features that were solely to maintain compatibility with Xcode 7 have been removed. This task has better options for using Microsoft-hosted macOS agents.",
Expand Down
2 changes: 1 addition & 1 deletion Tasks/XcodeV5/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"author": "Microsoft Corporation",
"version": {
"Major": 5,
"Minor": 185,
"Minor": 188,
"Patch": 0
},
"releaseNotes": "ms-resource:loc.releaseNotes",
Expand Down
9 changes: 8 additions & 1 deletion Tasks/XcodeV5/xcodeutils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,15 @@ function getPbxProjectPath(workspace: string) {
if (pathExistsAsFile(pbxProjectPath)) {
return pbxProjectPath;
}

tl.debug("Corresponding pbxProject file doesn't exist: " + pbxProjectPath + ", checking alternative location");

let altPbxProjectPath = workspace.trim().toLowerCase().replace('.xcworkspace', '.xcodeproj/project.pbxproj');
if (pathExistsAsFile(altPbxProjectPath)) {
return altPbxProjectPath;
}
else {
tl.debug("Corresponding pbxProject file doesn't exist: " + pbxProjectPath);
tl.debug("Corresponding pbxProject file doesn't exist at alternative location: " + altPbxProjectPath);
}
}
}
Expand Down

0 comments on commit 0f4f7f7

Please sign in to comment.