Skip to content

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

Merged
forki merged 7 commits into
fsprojects:masterfrom
allykzam:issue/1100
Dec 1, 2015
Merged

forki merged 7 commits into
fsprojects:masterfrom
allykzam:issue/1100

Conversation

@allykzam

Copy link
Copy Markdown
Contributor

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.

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.
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.
Will update again when I get `--nuget-source` working with file paths vs
the nuget web API
@forki

forki commented Nov 30, 2015

Copy link
Copy Markdown
Member

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

@allykzam

Copy link
Copy Markdown
Contributor Author

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

@allykzam

Copy link
Copy Markdown
Contributor Author

@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

forki commented Nov 30, 2015

Copy link
Copy Markdown
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).

@Haydabase

Copy link
Copy Markdown
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.

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

allykzam commented Dec 1, 2015

Copy link
Copy Markdown
Contributor Author

@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
Add options to force Nuget source and use local file paths with bootstrapper
@forki
forki merged commit cbb00d2 into fsprojects:master Dec 1, 2015
@allykzam
allykzam deleted the issue/1100 branch December 1, 2015 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants