mirror of
https://github.com/actions/runner-images.git
synced 2025-12-15 22:26:56 +00:00
[Windows] Set PHP-7.4 as default (#2170)
* debug message * debug output total folders * Install PHP-7.4
This commit is contained in:
committed by
GitHub
parent
55d0c3bed6
commit
906e2ab865
@@ -269,6 +269,8 @@ function Get-VSExtensionVersion
|
||||
$instanceFolders = Get-ChildItem -Path "C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances"
|
||||
if ($instanceFolders -is [array])
|
||||
{
|
||||
Write-Host ($instanceFolders | Out-String)
|
||||
Write-Host ($instanceFolders | Get-ChildItem | Out-String)
|
||||
Write-Host "More than one instance installed"
|
||||
exit 1
|
||||
}
|
||||
@@ -279,7 +281,7 @@ function Get-VSExtensionVersion
|
||||
|
||||
if (-not $packageVersion)
|
||||
{
|
||||
Write-Host "installed package $packageName for Visual Studio 2019 was not found"
|
||||
Write-Host "Installed package $packageName for Visual Studio 2019 was not found"
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
@@ -3,9 +3,14 @@
|
||||
## Desc: Install PHP
|
||||
################################################################################
|
||||
|
||||
# Get latest PHP-7.4
|
||||
$url = "https://raw.githubusercontent.com/chocolatey-community/chocolatey-coreteampackages/master/automatic/php/php.json"
|
||||
$phpVersion = [System.Net.WebClient]::new().DownloadString($url) | ConvertFrom-Json
|
||||
$latestPHPVersion = $phpVersion.'7.4'
|
||||
|
||||
# Install latest PHP in chocolatey
|
||||
$installDir = "c:\tools\php"
|
||||
Choco-Install -PackageName php -ArgumentList "--force", "--params", "/InstallDir:$installDir"
|
||||
Choco-Install -PackageName php -ArgumentList "--version=$latestPHPVersion","--force", "--params", "/InstallDir:$installDir"
|
||||
|
||||
# Install latest Composer in chocolatey
|
||||
Choco-Install -PackageName composer -ArgumentList "--ia", "/DEV=$installDir /PHP=$installDir"
|
||||
|
||||
Reference in New Issue
Block a user