Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uses 'PAKET.VERSION' environment variable for bootstrap requests #771

Merged
merged 3 commits into from
Apr 13, 2015

Conversation

devboy
Copy link
Contributor

@devboy devboy commented Apr 13, 2015

When the environment variable PAKET.VERSION exists paket.bootstrap.exe will download that version when no argument is given:

~/Desktop env PAKET.VERSION=0.38.6 mono paket.bootstrapper.exe
Version 0.38.6 requested.
Paket.exe 0.38.6.0 is up to date.

When a version argument (or prerelease flag) is passed to paket.bootstrap.exe it will behave as always:

env PAKET.VERSION=0.38.6 mono paket.bootstrapper.exe 0.40.1
Version 0.40.1 requested.
Starting download from https://github.com/fsprojects/Paket/releases/download/0.40.1/paket.exe

This will simplify pinning the version of paket on local and CI environments. Especially for ProjectScaffold projects where you would have to edit multiple places in the build.cmd and build.sh files.

@forki
Copy link
Member

forki commented Apr 13, 2015

could you please add a bit of documentation for this?
Thanks

@devboy
Copy link
Contributor Author

devboy commented Apr 13, 2015

Will do.
PAKET.VERSION as env variable is fine?
Or would you prefer something like PAKET.BOOTSTRAP.VERSION ?

@forki
Copy link
Member

forki commented Apr 13, 2015

PAKET.VERSION is ok

@devboy
Copy link
Contributor Author

devboy commented Apr 13, 2015

Let me know if you think this is sufficient information.

@devboy
Copy link
Contributor Author

devboy commented Apr 13, 2015

Just noticed that this might not be expected bahviour:

$ env PAKET.VERSION=0.38.6 mono paket.bootstrapper.exe prerelease
Prerelease requested. Looking for latest prerelease.
Starting download from https://github.com/fsprojects/Paket/releases/download/0.38.6/paket.exe

@devboy
Copy link
Contributor Author

devboy commented Apr 13, 2015

Okay, when given prerelease option the env var is ignored. So everything will behave as it did previously and according to the documentation.

@forki
Copy link
Member

forki commented Apr 13, 2015

cool. thanks.

forki added a commit that referenced this pull request Apr 13, 2015
Uses 'PAKET.VERSION' environment variable for bootstrap requests
@forki forki merged commit 533da96 into fsprojects:master Apr 13, 2015
@Stift
Copy link
Contributor

Stift commented Apr 13, 2015

Very nice idea. 👍

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