Last active
February 14, 2019 20:01
-
-
Save SchlenkR/24929b78f496a78cadd8f534148b7719 to your computer and use it in GitHub Desktop.
Get the f# paket bootstrapper via a PowerShell Cmdlet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# from: https://devonburriss.me/up-and-running-with-paket | |
# | |
# If you find yourself needing to setup Paket often as can happen if you are using F# fsx scripting files often, | |
# you may want to create an easier to remember command. The easiest way to do this is to add a function call to | |
# your Powershell profile. | |
# | |
# Edit "C:\Users\<your username>\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1" on Windows | |
# or ~/.config/powershell/profile.ps1 on Mac and add the following function: | |
function New-Paket { | |
New-Item -ItemType directory -Path ".paket" | |
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 | |
$tag = (Invoke-WebRequest -Uri https://api.github.com/repos/fsprojects/Paket/releases | ConvertFrom-Json)[0].tag_name | |
$uri = " https://github.com/fsprojects/Paket/releases/download/" + $tag + "/paket.bootstrapper.exe" | |
Invoke-WebRequest $uri -OutFile .paket/paket.exe | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment