Skip to content

Commit 1b865dd

Browse files
authored
fix php5.6 workspace aerospike travis-ci build failed. (laradock#1738)
1 parent 8180804 commit 1b865dd

3 files changed

Lines changed: 23 additions & 7 deletions

File tree

env-example

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,8 @@ AEROSPIKE_INFO_PORT=3003
336336
# for all versions "https://github.com/aerospike/aerospike-client-php/archive/master.tar.gz"
337337
# 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"
338338
AEROSPIKE_PHP_REPOSITORY=https://github.com/aerospike/aerospike-client-php/archive/7.2.0-release-candidate.tar.gz
339+
# for php 5.6
340+
# AEROSPIKE_PHP_REPOSITORY=https://github.com/aerospike/aerospike-client-php5/archive/3.4.15.tar.gz
339341

340342
### RETHINKDB #############################################
341343

@@ -406,4 +408,4 @@ MONGO_WEBUI_INSTALL_MONGO=false
406408
### METABASE ###############################################
407409
METABASE_PORT=3030
408410
METABASE_DB_FILE=metabase.db
409-
METABASE_JAVA_TIMEZONE=US/Pacific
411+
METABASE_JAVA_TIMEZONE=US/Pacific

travis-build.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ if [ -n "${PHP_VERSION}" ]; then
1515
sed -i -- "s/PHP_VERSION=.*/PHP_VERSION=${PHP_VERSION}/g" .env
1616
sed -i -- 's/=false/=true/g' .env
1717
sed -i -- 's/PHPDBG=true/PHPDBG=false/g' .env
18+
if [ "${PHP_VERSION}" == "5.6" ]; then
19+
sed -i -- 's/^AEROSPIKE_PHP_REPOSITORY=/##AEROSPIKE_PHP_REPOSITORY=/g' .env
20+
sed -i -- 's/^# AEROSPIKE_PHP_REPOSITORY=/AEROSPIKE_PHP_REPOSITORY=/g' .env
21+
fi
1822
cat .env
1923
docker-compose build ${BUILD_SERVICE}
2024
docker images

workspace/Dockerfile

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -493,12 +493,22 @@ RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \
493493
curl -L -o /tmp/aerospike-client-php.tar.gz ${AEROSPIKE_PHP_REPOSITORY} \
494494
&& mkdir -p aerospike-client-php \
495495
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
496-
&& ( \
497-
cd aerospike-client-php/src \
498-
&& phpize \
499-
&& ./build.sh \
500-
&& make install \
501-
) \
496+
&& \
497+
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
498+
( \
499+
cd aerospike-client-php/src/aerospike \
500+
&& phpize \
501+
&& ./build.sh \
502+
&& make install \
503+
) \
504+
else \
505+
( \
506+
cd aerospike-client-php/src \
507+
&& phpize \
508+
&& ./build.sh \
509+
&& make install \
510+
) \
511+
fi \
502512
&& rm /tmp/aerospike-client-php.tar.gz \
503513
&& echo 'extension=aerospike.so' >> /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/aerospike.ini \
504514
&& echo 'aerospike.udf.lua_system_path=/usr/local/aerospike/lua' >> /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/aerospike.ini \

0 commit comments

Comments
 (0)