Skip to content

Commit

Permalink
Add support for tideways (#783)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlocati authored Aug 9, 2023
1 parent 3059935 commit cb63117
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
1 change: 1 addition & 0 deletions data/supported-extensions
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ sysvmsg 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2
sysvsem 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2
sysvshm 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2
tensor 7.2 7.3 7.4 8.0
tideways 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2
tidy 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2
timezonedb 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2
uopz 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2
Expand Down
49 changes: 48 additions & 1 deletion install-php-extensions
Original file line number Diff line number Diff line change
Expand Up @@ -3620,6 +3620,53 @@ installRemoteModule() {
fi
fi
;;
tideways)
case "$DISTRO" in
alpine)
case $(uname -m) in
aarch64 | arm64 | armv8)
installRemoteModule_architecture=alpine-arm64
;;
*)
installRemoteModule_architecture=alpine
;;
esac
;;
debian)
case $(uname -m) in
aarch64 | arm64 | armv8)
installRemoteModule_architecture=arm64
;;
*)
installRemoteModule_architecture=x86_64
;;
esac
;;
esac
installRemoteModule_url="$(curl -sSLf -o - https://tideways.com/profiler/downloads | grep -Eo "\"[^\"]+/tideways-php-([0-9]+\.[0-9]+\.[0-9]+)-$installRemoteModule_architecture.tar.gz\"" | cut -d'"' -f2)"
printf 'Downloading tideways from %s\n' "$installRemoteModule_url"
installRemoteModule_src="$(getPackageSource $installRemoteModule_url)"
if test -d "$installRemoteModule_src/dist"; then
installRemoteModule_src="$installRemoteModule_src/dist"
fi
installRemoteModule_src="$installRemoteModule_src/tideways-php"
case "$DISTRO" in
alpine)
installRemoteModule_src="$installRemoteModule_src-alpine"
;;
esac
installRemoteModule_src="$installRemoteModule_src-$PHP_MAJDOTMIN_VERSION"
if test $PHP_THREADSAFE -eq 1; then
installRemoteModule_src="$installRemoteModule_src-zts"
fi
installRemoteModule_src="$installRemoteModule_src.so"
if ! test -f "$installRemoteModule_src"; then
echo 'tideways does not support the current environment' >&2
exit 1
fi
mv "$installRemoteModule_src" $(getPHPExtensionsDir)/tideways.so
installRemoteModule_manuallyInstalled=1
;;
uopz)
if test -z "$installRemoteModule_version"; then
if test $PHP_MAJMIN_VERSION -le 506; then
Expand Down Expand Up @@ -3851,7 +3898,7 @@ moduleMayUsePecl() {
@composer | @fix_letsencrypt)
return 1
;;
blackfire | geos | ioncube_loader | snuffleupagus | sourceguardian | spx | tdlib)
blackfire | geos | ioncube_loader | snuffleupagus | sourceguardian | spx | tdlib | tideways)
return 1
;;
esac
Expand Down

0 comments on commit cb63117

Please sign in to comment.