Fix installing datadog_trace when specifying the version (#881)

pull/883/head 2.1.83
Michele Locati 2024-02-05 10:06:11 +01:00 committed by GitHub
parent d56469d230
commit 9ba2b2a8f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 4 deletions

View File

@ -387,7 +387,8 @@ resolvePHPModuleVersion() {
resolvePHPModuleVersion_wantedVersion="$resolvePHPModuleVersion_afterCaret" resolvePHPModuleVersion_wantedVersion="$resolvePHPModuleVersion_afterCaret"
;; ;;
esac esac
resolvePHPModuleVersion_xml="$(curl -sSLf "http://pecl.php.net/rest/r/$resolvePHPModuleVersion_module/allreleases.xml")" resolvePHPModuleVersion_peclModule="$(getPeclModuleName "$resolvePHPModuleVersion_module")"
resolvePHPModuleVersion_xml="$(curl -sSLf "http://pecl.php.net/rest/r/$resolvePHPModuleVersion_peclModule/allreleases.xml")"
# remove line endings, collapse spaces # remove line endings, collapse spaces
resolvePHPModuleVersion_versions="$(printf '%s' "$resolvePHPModuleVersion_xml" | tr -s ' \t\r\n' ' ')" resolvePHPModuleVersion_versions="$(printf '%s' "$resolvePHPModuleVersion_xml" | tr -s ' \t\r\n' ' ')"
# one line per release (eg <r><v>1.2.3</v><s>stable</s></r>) # one line per release (eg <r><v>1.2.3</v><s>stable</s></r>)
@ -449,7 +450,8 @@ resolvePeclStabilityVersion() {
return return
;; ;;
esac esac
peclStabilityFlagToVersion_url="http://pecl.php.net/rest/r/$1/$2.txt" resolvePeclStabilityVersion_peclModule="$(getPeclModuleName "$1")"
peclStabilityFlagToVersion_url="http://pecl.php.net/rest/r/$resolvePeclStabilityVersion_peclModule/$2.txt"
if ! peclStabilityFlagToVersion_result="$(curl -sSLf "$peclStabilityFlagToVersion_url")"; then if ! peclStabilityFlagToVersion_result="$(curl -sSLf "$peclStabilityFlagToVersion_url")"; then
peclStabilityFlagToVersion_result='' peclStabilityFlagToVersion_result=''
fi fi
@ -2760,9 +2762,12 @@ installRemoteModule() {
if test -z "$installRemoteModule_version"; then if test -z "$installRemoteModule_version"; then
if test $PHP_MAJMIN_VERSION -lt 700; then if test $PHP_MAJMIN_VERSION -lt 700; then
installRemoteModule_version=0.75.0 installRemoteModule_version=0.75.0
else
installCargo
fi fi
else
installRemoteModule_version="$(resolvePeclStabilityVersion "$installRemoteModule_module" "$installRemoteModule_version")"
fi
if test -z "$installRemoteModule_version" || test $(compareVersions "$installRemoteModule_version" 0.75.0) -ge 0; then
installCargo
fi fi
;; ;;
decimal) decimal)