Nomad changes
All checks were successful
Deploy fil (kreuzberg) / deploy (push) Successful in 49s

This commit is contained in:
Henrik Jess Nielsen
2026-06-01 23:40:55 +02:00
parent 72b1a0a6ed
commit b4c07d3693
5723 changed files with 1130655 additions and 0 deletions

32
scripts/install-php-ext.sh Executable file
View File

@@ -0,0 +1,32 @@
#!/bin/bash
set -e
# Install the kreuzberg PHP extension to the system PHP extension directory
# Called from the before hook in alef.toml for PHP e2e tests
EXTENSION_DIR=$(php -r 'echo ini_get("extension_dir");')
# Find the built extension
for path in target/release/libkreuzberg_php.dylib target/release/libkreuzberg_php.so target/release/kreuzberg_php.dll; do
if [ -f "$path" ]; then
EXT_PATH="$path"
break
fi
done
if [ -z "$EXT_PATH" ]; then
echo "Error: PHP extension not found in target/release/" >&2
exit 1
fi
# Copy to extension directory
EXT_FILENAME=$(basename "$EXT_PATH")
cp "$EXT_PATH" "$EXTENSION_DIR/$EXT_FILENAME"
# Add to php.ini if not already present
PHP_INI=$(php -r 'echo php_ini_loaded_file();')
if ! grep -q "extension=$EXT_FILENAME" "$PHP_INI"; then
echo "extension=$EXT_FILENAME" >>"$PHP_INI"
fi
echo "Installed PHP extension: $EXT_FILENAME to $EXTENSION_DIR"