Skip to content

Commit

Permalink
Added secondary location check for pbxProject
Browse files Browse the repository at this point in the history
  • Loading branch information
Timothy Rundle committed Apr 15, 2021
1 parent e8abe8b commit 90e797a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 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": 186,
"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": 186,
"Patch": 0
},
"releaseNotes": "ms-resource:loc.releaseNotes",
Expand Down
7 changes: 7 additions & 0 deletions Tasks/XcodeV5/xcodeutils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,13 @@ function getPbxProjectPath(workspace: string) {
if (workspace && workspace.trim().toLowerCase().endsWith('.xcworkspace')) {
let pbxProjectPath: string = workspace.trim().toLowerCase().replace('.xcworkspace', '.pbxproj');

if (pathExistsAsFile(pbxProjectPath)) {
return pbxProjectPath;
}

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

pbxProjectPath = workspace.trim().toLowerCase().replace('.xcworkspace', '.xcodeproj/project.pbxproj');
if (pathExistsAsFile(pbxProjectPath)) {
return pbxProjectPath;
}
Expand Down

0 comments on commit 90e797a

Please sign in to comment.