Adjust Xamarin.iOS archive helper params. #693
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
When converting a Xamarin project from RAKE to FAKE, I was having issues using the XamarinHelper
iOSArchive
method. If I sent a project filename or fully-qualified path into theProjectPath
parameter, it would instead grab the nearest solution file and try to find that "path" as a project name. It turns out that parameter is used to name a project within a solution rather than a path.Solution
Since mdtool can take both a project/solution file parameter and a project name parameter, I adjusted it to accept both.
ProjectPath
parameter toProjectName
to better reflect its purpose as a project name to find in a given (or fallback) solution.Tested
Here are some versions I was able to get to work with a simple Xamarin.Forms project I created with a solution at the same level as the build.fsx file being processed.
Potential Problems
Could be useful to output a debug message when no solution path is provided and mdtool will end up grabbing the first solution file it finds.
Although mdtool can build from a project file directly, I was getting errors trying to archive from one. So, while SolutionPath could potentially take a project path, the archive step appears to fail.
ERROR: Failed to archive project. Argument cannot be null.
Parameter name: inSolution
Running build failed.
I'm still fairly new to F#, so my conditional logic to create an optional mdtool argument may not be ideal.