diff --git a/env-example b/env-example index 513425c6..15f55b8d 100644 --- a/env-example +++ b/env-example @@ -336,6 +336,8 @@ AEROSPIKE_INFO_PORT=3003 # for all versions "https://github.com/aerospike/aerospike-client-php/archive/master.tar.gz" # for php 7.2 (using this branch until the support for 7.2 on master) "https://github.com/aerospike/aerospike-client-php/archive/7.2.0-release-candidate.tar.gz" AEROSPIKE_PHP_REPOSITORY=https://github.com/aerospike/aerospike-client-php/archive/7.2.0-release-candidate.tar.gz +# for php 5.6 +# AEROSPIKE_PHP_REPOSITORY=https://github.com/aerospike/aerospike-client-php5/archive/3.4.15.tar.gz ### RETHINKDB ############################################# @@ -406,4 +408,4 @@ MONGO_WEBUI_INSTALL_MONGO=false ### METABASE ############################################### METABASE_PORT=3030 METABASE_DB_FILE=metabase.db -METABASE_JAVA_TIMEZONE=US/Pacific \ No newline at end of file +METABASE_JAVA_TIMEZONE=US/Pacific diff --git a/travis-build.sh b/travis-build.sh index d6aec972..eeee67ba 100755 --- a/travis-build.sh +++ b/travis-build.sh @@ -15,6 +15,10 @@ if [ -n "${PHP_VERSION}" ]; then sed -i -- "s/PHP_VERSION=.*/PHP_VERSION=${PHP_VERSION}/g" .env sed -i -- 's/=false/=true/g' .env sed -i -- 's/PHPDBG=true/PHPDBG=false/g' .env + if [ "${PHP_VERSION}" == "5.6" ]; then + sed -i -- 's/^AEROSPIKE_PHP_REPOSITORY=/##AEROSPIKE_PHP_REPOSITORY=/g' .env + sed -i -- 's/^# AEROSPIKE_PHP_REPOSITORY=/AEROSPIKE_PHP_REPOSITORY=/g' .env + fi cat .env docker-compose build ${BUILD_SERVICE} docker images diff --git a/workspace/Dockerfile b/workspace/Dockerfile index 60c6cdb1..2a639f11 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -493,12 +493,22 @@ RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \ curl -L -o /tmp/aerospike-client-php.tar.gz ${AEROSPIKE_PHP_REPOSITORY} \ && mkdir -p aerospike-client-php \ && tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \ - && ( \ - cd aerospike-client-php/src \ - && phpize \ - && ./build.sh \ - && make install \ - ) \ + && \ + if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \ + ( \ + cd aerospike-client-php/src/aerospike \ + && phpize \ + && ./build.sh \ + && make install \ + ) \ + else \ + ( \ + cd aerospike-client-php/src \ + && phpize \ + && ./build.sh \ + && make install \ + ) \ + fi \ && rm /tmp/aerospike-client-php.tar.gz \ && echo 'extension=aerospike.so' >> /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/aerospike.ini \ && echo 'aerospike.udf.lua_system_path=/usr/local/aerospike/lua' >> /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/aerospike.ini \