Handle different platforms in ProjectFile.GetOutputPath #1269

Merged
merged 4 commits into from Dec 1, 2015

Conversation

Projects
None yet
2 participants
@amazingant
Contributor

amazingant commented Nov 30, 2015

Added a buildplatform option to the paket pack command and sprinkled it lovingly throughout the codebase anywhere the compiler complained loudly enough. ProjectFile.GetOutputPath now attempts to evaluate the project file for the OutputPath value given the specified platform. If no platform is specified, runs through a list of platforms until one of them works or the list becomes empty.

Given how ProjectFile.GetPropertyWithDefaults is currently written, these platform values look like they'll be case-sensitive, but this could easily be changed if needed.

cc/ @agross: If you have a few minutes, can you see if this resolves #1262?

amazingant added some commits Nov 30, 2015

Add buildPlatform param to ProjectFile.GetOutputDirectory
Added it everywhere that the compiler complained about, and added a new
`buildplatform` option to the `paket pack` command to supply the new
value.
Attempt specified platform(s) when getting project's output path
If String.IsNullOrWhiteSpace returns true for the specified platform,
then all of the platforms specified at the following MSDN article (as of
now) are tested:
https://msdn.microsoft.com/en-us/library/zekwfyz4.aspx

If a platform is specified, that platform is tested.
@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Dec 1, 2015

Member

something doesn't compile

Member

forki commented Dec 1, 2015

something doesn't compile

Add forgotten param to ProjectFile.GetOutputDirectory
Forgot to specify an value when I added the `attempted` param to the
`tryNextPlat` helper function.
@amazingant

This comment has been minimized.

Show comment
Hide comment
@amazingant

amazingant Dec 1, 2015

Contributor

Sorry; added a parameter to my helper function and then forgot to pass it a value.

Contributor

amazingant commented Dec 1, 2015

Sorry; added a parameter to my helper function and then forgot to pass it a value.

@forki forki merged commit 1ce770f into fsprojects:master Dec 1, 2015

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Dec 1, 2015

Member

thx

Member

forki commented Dec 1, 2015

thx

@amazingant amazingant deleted the amazingant:issue/1262 branch Dec 1, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment