mirror of
https://github.com/ScoopInstaller/Scoop.git
synced 2026-09-19 03:46:03 +00:00
35 lines
1.6 KiB
PowerShell
35 lines
1.6 KiB
PowerShell
Write-Host "PowerShell: $($PSVersionTable.PSVersion)"
|
|
(7z.exe | Select-String -Pattern '7-Zip').ToString()
|
|
Write-Host "Install dependencies ..."
|
|
Install-Module -Repository PSGallery -Scope CurrentUser -Force -Name Pester -SkipPublisherCheck
|
|
Install-Module -Repository PSGallery -Scope CurrentUser -Force -Name PSScriptAnalyzer,BuildHelpers
|
|
|
|
if ($env:CI_WINDOWS -eq $true) {
|
|
if(!(Test-Path $env:SCOOP_HELPERS)) {
|
|
New-Item -ItemType Directory -Path $env:SCOOP_HELPERS
|
|
}
|
|
if(!(Test-Path "$env:SCOOP_HELPERS\lessmsi\lessmsi.exe")) {
|
|
Start-FileDownload 'https://github.com/activescott/lessmsi/releases/download/v1.6.3/lessmsi-v1.6.3.zip' -FileName "$env:SCOOP_HELPERS\lessmsi.zip"
|
|
& 7z.exe x "$env:SCOOP_HELPERS\lessmsi.zip" -o"$env:SCOOP_HELPERS\lessmsi" -y
|
|
}
|
|
if(!(Test-Path "$env:SCOOP_HELPERS\innounp\innounp.exe")) {
|
|
Start-FileDownload 'https://raw.githubusercontent.com/ScoopInstaller/Binary/master/innounp/innounp048.rar' -FileName "$env:SCOOP_HELPERS\innounp.rar"
|
|
& 7z.exe x "$env:SCOOP_HELPERS\innounp.rar" -o"$env:SCOOP_HELPERS\innounp" -y
|
|
}
|
|
}
|
|
|
|
if($env:CI -eq $true) {
|
|
Write-Host "Load 'BuildHelpers' environment variables ..."
|
|
Set-BuildEnvironment -Force
|
|
}
|
|
|
|
$buildVariables = ( Get-ChildItem -Path 'Env:' ).Where( { $_.Name -match "^(?:BH|CI(?:_|$)|APPVEYOR)" } )
|
|
$buildVariables += ( Get-Variable -Name 'CI_*' -Scope 'Script' )
|
|
$details = $buildVariables |
|
|
Where-Object -FilterScript { $_.Name -notmatch 'EMAIL' } |
|
|
Sort-Object -Property 'Name' |
|
|
Format-Table -AutoSize -Property 'Name', 'Value' |
|
|
Out-String
|
|
Write-Host "CI variables:"
|
|
Write-Host $details -ForegroundColor DarkGray
|