Use tagged version of php-sdk-binary-tools

This commit is contained in:
Shivam Mathur
2024-07-16 20:03:16 +05:30
parent 8f789e3c41
commit 77afcacf4f
2 changed files with 6 additions and 4 deletions

View File

@@ -7,7 +7,8 @@ function Get-PhpSdk {
param (
)
begin {
$url = "https://github.com/php/php-sdk-binary-tools/archive/master.zip"
$sdkVersion = "2.3.0"
$url = "https://github.com/php/php-sdk-binary-tools/archive/php-sdk-$sdkVersion.zip"
}
process {
Add-Type -Assembly "System.IO.Compression.Filesystem"
@@ -16,7 +17,7 @@ function Get-PhpSdk {
$currentDirectory = (Get-Location).Path
$sdkZipFilePath = Join-Path $currentDirectory php-sdk.zip
[System.IO.Compression.ZipFile]::ExtractToDirectory($sdkZipFilePath, $currentDirectory)
Rename-Item -Path php-sdk-binary-tools-master php-sdk
Rename-Item -Path php-sdk-binary-tools-php-sdk-$sdkVersion php-sdk
$sdkDirectoryPath = Join-Path $currentDirectory php-sdk
$sdkBinDirectoryPath = Join-Path $sdkDirectoryPath bin

View File

@@ -7,12 +7,13 @@ function Get-PhpSdk {
param (
)
begin {
$url = "https://github.com/php/php-sdk-binary-tools/archive/master.zip"
$sdkVersion = "2.3.0"
$url = "https://github.com/php/php-sdk-binary-tools/archive/php-sdk-$sdkVersion.zip"
}
process {
Invoke-WebRequest $url -OutFile php-sdk.zip
Expand-Archive -Path php-sdk.zip -DestinationPath .
Rename-Item -Path php-sdk-binary-tools-master php-sdk
Rename-Item -Path php-sdk-binary-tools-php-sdk-$sdkVersion php-sdk
}
end {
}