Improve phalcon5 support

This commit is contained in:
Shivam Mathur 2022-10-24 03:35:44 +05:30
parent 6652a09da6
commit 7622357ff1
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A
2 changed files with 4 additions and 6 deletions

View File

@ -25,10 +25,9 @@ Function Add-PhalconFromGitHub() {
}
# Function to install phalcon
Function Add-PhalconHelper() {
if ($extension_version -eq '5') {
Add-PhalconFromGitHub -Semver (Get-PeclPackageVersion phalcon 5 snapshot stable | Select-Object -First 1)
} elseif ($extension_version -eq '4') {
Install-Phpextension -Extension phalcon -MinimumStability stable -Path $php_dir
if (($extension_version -eq '4') -or ($extension_version -eq '5')) {
$extension_semver=Get-PeclPackageVersion phalcon $extension_version stable stable | Select-Object -First 1
Add-Extension -Extension phalcon -Stability stable -Extension_version $extension_semver
} elseif ($extension_version -eq '3') {
Add-PhalconFromGitHub -Semver 3.4.5
}

View File

@ -1,8 +1,7 @@
# Helper function to get phalcon version
get_phalcon_version() {
if [ "$extension" = "phalcon5" ]; then
semver="$(get_pecl_version phalcon stable 5)"
([ -n "$semver" ] && echo "$semver") || get_pecl_version phalcon rc 5
get_pecl_version phalcon stable 5
elif [ "$extension" = "phalcon4" ]; then
echo '4.1.3'
elif [ "$extension" = "phalcon3" ]; then