mirror of
https://github.com/shivammathur/setup-php.git
synced 2025-07-25 16:19:08 +07:00
15 lines
808 B
PowerShell
15 lines
808 B
PowerShell
![]() |
Function Add-Symfony() {
|
||
|
$arch_name ='amd64'
|
||
|
if(-not([Environment]::Is64BitOperatingSystem) -or $version -lt '7.0') {
|
||
|
$arch_name = '386'
|
||
|
}
|
||
|
$url = "https://github.com/symfony-cli/symfony-cli/releases/latest/download/symfony-cli_windows_${arch_name}.zip"
|
||
|
Invoke-WebRequest -Uri $url -OutFile $bin_dir\symfony.zip >$null 2>&1
|
||
|
Expand-Archive -Path $bin_dir\symfony.zip -DestinationPath $bin_dir -Force >$null 2>&1
|
||
|
Copy-Item -Path $bin_dir\symfony.exe -Destination $bin_dir\symfony-cli.exe >$null 2>&1
|
||
|
Add-ToProfile $current_profile 'symfony' "New-Alias symfony $bin_dir\symfony.exe"
|
||
|
Add-ToProfile $current_profile 'symfony_cli' "New-Alias symfony-cli $bin_dir\symfony-cli.exe"
|
||
|
$tool_version = Get-ToolVersion symfony "-V"
|
||
|
Add-Log $tick "symfony-cli" "Added symfony-cli $tool_version"
|
||
|
}
|