forked from chocolatey/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.ps1
24 lines (20 loc) · 881 Bytes
/
setup.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
$scriptDir = $(Split-Path -parent $MyInvocation.MyCommand.Definition)
# Install chocolatey if required
Try
{
Get-Command choco -ErrorAction Stop
}
Catch
{
Write-Host "Chocolatey not installed..."
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
$ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
if (Test-Path($ChocolateyProfile)) {
Import-Module "$ChocolateyProfile"
}
}
Write-Host "Installing base line applications for Chocolatey docs..."
choco upgrade dotnetcore-sdk -y --version 3.1.404 --no-progress
choco upgrade nodejs-lts -y --no-progress
Write-Host "Enabling corepack for Yarn management..."
corepack enable