|
16 | 16 |
|
17 | 17 | mkdir /tmp/blackfire
|
18 | 18 |
|
19 |
| -# Todo: Maybe version the Blackfire version by environment variable? :) |
20 |
| - |
21 | 19 | if [ $BLACKFIRE_VERSION == "1" ]; then
|
22 | 20 | echo "Installing Blackfire version 1"
|
23 | 21 | # curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v2/releases/probe/php/linux/amd64/$version
|
24 |
| - curl -o /tmp/blackfire/blackfire.so "https://packages.blackfire.io/binaries/blackfire-php/1.78.0/blackfire-php-$CONTAINER_OS"_"$CONTAINER_ARCH-php-$version.so" |
| 22 | + curl -o /tmp/blackfire/blackfire.so "https://packages.blackfire.io/binaries/blackfire-php/1.78.0/blackfire-php-${TARGETOS}"_"${TARGETARCH}-php-${version}.so" |
25 | 23 | mv /tmp/blackfire/blackfire.so $(php -r "echo ini_get('extension_dir');")/blackfire.so
|
26 |
| - echo "extension=blackfire.so" > /etc/php/${PHP_VERSION}/mods-available/blackfire.ini |
| 24 | + echo "extension=blackfire" > /etc/php/${PHP_VERSION}/mods-available/blackfire.ini |
27 | 25 |
|
28 | 26 | # Adding this in the list of Ubuntu extensions because we use that list as a base for the modules list.
|
29 | 27 | # TODO: question: cannot we use /etc/php/mods-available instead???
|
30 | 28 | touch /var/lib/php/modules/${PHP_VERSION}/registry/blackfire
|
31 | 29 | # curl -A "Docker" -L https://blackfire.io/api/v1/releases/client/linux_static/amd64 | tar zxp -C /tmp/blackfire
|
32 |
| - curl -o /tmp/blackfire/blackfire "https://packages.blackfire.io/binaries/blackfire-agent/1.50.0/blackfire-cli-$CONTAINER_OS"_"$CONTAINER_ARCH" |
| 30 | + curl -o /tmp/blackfire/blackfire "https://packages.blackfire.io/binaries/blackfire-agent/1.50.0/blackfire-cli-${TARGETOS}"_"${TARGETARCH}" |
33 | 31 | chmod +x /tmp/blackfire/blackfire
|
34 | 32 | mv /tmp/blackfire/blackfire /usr/bin/blackfire
|
35 | 33 | rm -Rf /tmp/blackfire
|
36 | 34 |
|
37 | 35 | elif [ $BLACKFIRE_VERSION == "2" ]; then
|
38 | 36 | echo "Installing Blackfire version 2..."
|
39 | 37 |
|
40 |
| - curl -o /tmp/blackfire/blackfire.so "https://packages.blackfire.io/binaries/blackfire-php/1.78.0/blackfire-php-$CONTAINER_OS"_"$CONTAINER_ARCH-php-$version.so" |
| 38 | + curl -o /tmp/blackfire/blackfire.so "https://packages.blackfire.io/binaries/blackfire-php/1.78.0/blackfire-php-${TARGETOS}"_"${TARGETARCH}-php-${version}.so" |
41 | 39 | mv /tmp/blackfire/blackfire.so $(php -r "echo ini_get('extension_dir');")/blackfire.so
|
42 | 40 | echo "extension=blackfire.so" > /etc/php/${PHP_VERSION}/mods-available/blackfire.ini
|
43 | 41 | touch /var/lib/php/modules/${PHP_VERSION}/registry/blackfire
|
44 |
| - curl -o /tmp/blackfire-cli.tar.gz "https://packages.blackfire.io/binaries/blackfire/2.10.0/blackfire-"$CONTAINER_OS"_"$CONTAINER_ARCH".tar.gz" |
| 42 | + curl -o /tmp/blackfire-cli.tar.gz "https://packages.blackfire.io/binaries/blackfire/2.10.0/blackfire-"${TARGETOS}"_"${TARGETARCH}".tar.gz" |
45 | 43 | tar zxpf /tmp/blackfire-cli.tar.gz -C /tmp/blackfire
|
46 | 44 | mv /tmp/blackfire/blackfire /usr/bin/blackfire
|
47 | 45 |
|
|
0 commit comments