Move $arch_name to tools/blackfire.ps1

This commit is contained in:
Shivam Mathur 2020-09-06 14:30:37 +05:30
parent 872187355a
commit 5787967c1f
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A
2 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,9 @@
# Function to add blackfire and blackfire-agent.
Function Add-Blackfire() {
$arch_name ='amd64'
if(-not([Environment]::Is64BitOperatingSystem) -or $version -lt '7.0') {
$arch_name = '386'
}
$agent_version = (Invoke-RestMethod https://blackfire.io/api/v1/releases).agent
$url = "https://packages.blackfire.io/binaries/blackfire-agent/${agent_version}/blackfire-agent-windows_${arch_name}.zip"
Invoke-WebRequest -UseBasicParsing -Uri $url -OutFile $bin_dir\blackfire.zip >$null 2>&1

View File

@ -289,10 +289,8 @@ $master_version = '8.0'
$cert_source='CurrentUser'
$arch = 'x64'
$arch_name ='amd64'
if(-not([Environment]::Is64BitOperatingSystem) -or $version -lt '7.0') {
$arch = 'x86'
$arch_name = '386'
}
$ts = $env:PHPTS -eq 'ts'