Add options to force Nuget source and use local file paths with bootstrapper #1268

Merged
merged 7 commits into from Dec 1, 2015

Conversation

Projects
None yet
3 participants
@amazingant
Contributor

amazingant commented Nov 30, 2015

Added a --force-nuget command-line argument to the bootstrapper to get paket.exe from nuget rather than github, and to not automatically fallback to github as the --prefer-nuget option does. Did this by just setting the FallbackStrategy to null, as the bootstrapper appears to already handle that here.

Additional changes coming to allow using a local file path for the nuget source specified with --nuget-source, rather than a web API.

amazingant added some commits Nov 30, 2015

+ forceNuget param to Bootstrapper.Program.GetEffectiveDownloadStrategy
If true, the Nuget download strategy is used, and no fallback strategy
is provided; ignores the value of preferNuget. If false, continues
existing evaluation, checking the preferNuget parameter.
Add `--force-nuget` CLA to bootstrapper w/`ForceNuget` setting option
If the `--force-nuget` command-line argument is supplied, or the
`ForceNuget` setting exists in the application settings and is set to
`true`, then the download strategy is set to only use the specified
Nuget source. As the previous commit mentioned, if this CLA isn't
specified and the app setting is either not present or not equal to
`true`, the `--prefer-nuget` option is evaluated as it was before.
Update bootstrapper docs to mention new nuget options
Will update again when I get `--nuget-source` working with file paths vs
the nuget web API
@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Nov 30, 2015

Member

@DavidHayden87 could you please review. thx
I need to make sure it works for anyone.

Member

forki commented Nov 30, 2015

@DavidHayden87 could you please review. thx
I need to make sure it works for anyone.

@amazingant

This comment has been minimized.

Show comment
Hide comment
@amazingant

amazingant Nov 30, 2015

Contributor

Should work now as of 14b9b4c; still need to update the code for the bootstrapper to update itself with.

Contributor

amazingant commented Nov 30, 2015

Should work now as of 14b9b4c; still need to update the code for the bootstrapper to update itself with.

@amazingant

This comment has been minimized.

Show comment
Hide comment
@amazingant

amazingant Nov 30, 2015

Contributor

@forki does it make sense to be checking the latestVersion value against String.Empty like this, versus using String.IsNullOrWhiteSpace? Trying to match the surrounding code.

Contributor

amazingant commented Nov 30, 2015

@forki does it make sense to be checking the latestVersion value against String.Empty like this, versus using String.IsNullOrWhiteSpace? Trying to match the surrounding code.

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Nov 30, 2015

Member

I guess nullorwhitespace would be better
On Nov 30, 2015 7:34 PM, "Anthony Perez" notifications@github.com wrote:

@forki https://github.com/forki does it make sense to be checking the
latestVersion value against String.Empty like this, versus using
String.IsNullOrWhiteSpace? Trying to match the surrounding code.


Reply to this email directly or view it on GitHub
#1268 (comment).

Member

forki commented Nov 30, 2015

I guess nullorwhitespace would be better
On Nov 30, 2015 7:34 PM, "Anthony Perez" notifications@github.com wrote:

@forki https://github.com/forki does it make sense to be checking the
latestVersion value against String.Empty like this, versus using
String.IsNullOrWhiteSpace? Trying to match the surrounding code.


Reply to this email directly or view it on GitHub
#1268 (comment).

@Haydabase

This comment has been minimized.

Show comment
Hide comment
@Haydabase

Haydabase Dec 1, 2015

Contributor

I've pulled down the bootstrapper binary from AppVeyor and tried it in our case where we pull from an internal NuGet web server, and it all seems to still work.

Contributor

Haydabase commented Dec 1, 2015

I've pulled down the bootstrapper binary from AppVeyor and tried it in our case where we pull from an internal NuGet web server, and it all seems to still work.

Change new comparisons against String.Empty to use IsNullOrWhiteSpace
Since I've changed this code anyway, updating it to use this method
covers a little more than just comparing against String.Empty.
@amazingant

This comment has been minimized.

Show comment
Hide comment
@amazingant

amazingant Dec 1, 2015

Contributor

@forki Just updated with changes to use String.IsNullOrWhiteSpace in the places I've touched, left all other use of String.Empty as-is for someone else to worry about. 😉

@DavidHayden87 Thanks!

Contributor

amazingant commented Dec 1, 2015

@forki Just updated with changes to use String.IsNullOrWhiteSpace in the places I've touched, left all other use of String.Empty as-is for someone else to worry about. 😉

@DavidHayden87 Thanks!

forki added a commit that referenced this pull request Dec 1, 2015

Merge pull request #1268 from amazingant/issue/1100
Add options to force Nuget source and use local file paths with bootstrapper

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

0 of 2 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details

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

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