forked from elastic/apm-agent-php
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into feature/support-apk
* upstream/master: Add ENVIRONMENT configuration option Change composer installation in docker (elastic#128) Add tests/APM_Agents_shared directory [packaging] support multiple PHP API (elastic#121) [Packaging] restore php.ini if something bad happened (elastic#116) [CI] Cosmetic changes in the stage names (elastic#115)
- Loading branch information
Showing
22 changed files
with
292 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -exo pipefail | ||
|
||
HYPHEN="-" | ||
MODULES_DIR=/app/src/ext/modules | ||
NAME=elastic_apm | ||
## Prepare context where to copy the previous generated so files | ||
GENERATED=$(mktemp -d /tmp/dir-XXXX) | ||
SEARCH="${MODULES_DIR}/*${HYPHEN}*.so" | ||
if ls "${SEARCH}" 1> /dev/null 2>&1; then | ||
cp -f "${SEARCH}" "${GENERATED}" || true | ||
fi | ||
|
||
## Generate so file | ||
make clean | ||
make | ||
|
||
## Fetch PHP api version to be added to the so file that has been generated | ||
PHP_API=$(php -i | grep -i 'PHP API' | sed -e 's#.* =>##g' | awk '{print $1}') | ||
|
||
## Rename so file with the PHP api | ||
mv "${MODULES_DIR}/${NAME}.so" "${MODULES_DIR}/${NAME}${HYPHEN}${PHP_API}.so" | ||
|
||
## Remove la files | ||
find "${MODULES_DIR}" -name "*.la" -print0 | xargs -0 rm -f | ||
|
||
## Restore previous so files. | ||
if ls "${SEARCH}" 1> /dev/null 2>&1; then | ||
cp -f "${SEARCH}" ${MODULES_DIR}/ | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.