-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathinstall-dependencies.ps1
More file actions
34 lines (27 loc) · 1.02 KB
/
install-dependencies.ps1
File metadata and controls
34 lines (27 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#Requires -Version "7.0"
[CmdletBinding()]
param (
[Parameter()]
[ValidateSet('.net', 'InvokeBuild', 'ThirdPartyLibraries')]
[string[]]
$List = ('.net', 'InvokeBuild', 'ThirdPartyLibraries')
)
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'
. (Join-Path $PSScriptRoot 'scripts/Get-ModuleVersion.ps1')
. (Join-Path $PSScriptRoot 'scripts/Invoke-InstallDotNet.ps1')
. (Join-Path $PSScriptRoot 'scripts/Invoke-InstallModule.ps1')
if ('.net' -in $List) {
Invoke-InstallDotNet -Version '8.0.403'
Invoke-InstallDotNet -Version '9.0.300'
$version = (Get-Content -Raw (Join-Path $PSScriptRoot '../Sources/global.json') | ConvertFrom-Json).sdk.version
Invoke-InstallDotNet -Version $version
}
if ('InvokeBuild' -in $List) {
$version = Get-ModuleVersion 'InvokeBuild'
Invoke-InstallModule -Name 'InvokeBuild' -Version $version
}
if ('ThirdPartyLibraries' -in $List) {
$version = Get-ModuleVersion 'ThirdPartyLibraries'
Invoke-InstallModule -Name 'ThirdPartyLibraries' -Version $version
}