CB-14099 osx: Fixed Resolve Config Path for OSX - #32
Conversation
Codecov Report
@@ Coverage Diff @@
## master #32 +/- ##
==========================================
- Coverage 85.63% 85.62% -0.01%
==========================================
Files 19 19
Lines 1747 1746 -1
Branches 367 367
==========================================
- Hits 1496 1495 -1
Misses 251 251
Continue to review full report at Codecov.
|
dpogue
left a comment
There was a problem hiding this comment.
👍
I wonder if we should try to do anything (far outside the scope of this PR) about the fact that "OS X" has been rebranded as "macOS"
|
+1 |
|
@dpogue I was also thinking about that. Even when I saw the if condition for Ubuntu, I wanted to delete it because it had been deprecated, but also had to leave it because it was out-of-scope. If its a good idea, we could scope out some changes and code cleanup. I wouldn't mind working on it. |
Platforms affected
OSX
What does this PR do?
Updates the Resolve Config Path for OSX.
I have identified that the initial build was successful but the consecutive builds fail because it updated the incorrect
config.xmlfile.I was able to narrow down this issue coming from the
resolveConfigFilePathmethod. This method currently handles special cases for Android, Ubuntu, and iOS. For all other platforms, it would fall back to glob for the config.xml. This is what was happens for OSX.When building for the first time, you have installed a fresh copy of the OSX platform.
At this time, when globbing, it will find the correct config.xml file located in
/.tests/<APP_NAME>/platforms/osx/<APP_NAME>/config.xml.In the consecutive build, when globbing, it finds and updates the incorrect config.xml file. The file it finds is:
/.tests/osx/<APP_NAME>/platforms/osx/build/<APP_NAME>.app/Contents/Resources/config.xmlThis is because of the folder/file order structure and globbing nature. Since this file was created after the first build (build history), it happens to find this file first.
What testing has been done on this change?
I also followed the reported issue steps:
cordova-osx@masterwith modifiedpackage.jsonto usecordova-common#CB-14099with my fix.Checklist