Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
* develop:
  Now able to detect index.php nested in another directory.
  Use $CACHE_DIR for composer cache.
  PHP v5.4.5.
  • Loading branch information
iphoting committed Jul 30, 2012
2 parents 96b088d + e64c2e4 commit b135136
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 6 deletions.
7 changes: 4 additions & 3 deletions bin/compile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set -o pipefail
NGINX_VERSION=1.2.2
LIBMCRYPT_VERSION=2.5.8
LIBMEMCACHED_VERSION=1.0.7
PHP_VERSION=5.4.4
PHP_VERSION=5.4.5
NEWRELIC_VERSION=2.9.5.78
S3_BUCKET=heroku-buildpack-php-tyler
# END CONFIG
Expand Down Expand Up @@ -53,11 +53,12 @@ BUILD_DIR=$1
CACHE_DIR=$2
BUNDLE_DIR="${CACHE_DIR}/bundles"
LP_DIR=`cd $(dirname $0); cd ..; pwd`
export COMPOSER_HOME="${CACHE_DIR}/.composer"

# include .files when moving things around
shopt -s dotglob

mkdir -p $BUILD_DIR $CACHE_DIR ${BUNDLE_DIR} ${BUILD_DIR}/local ${BUILD_DIR}/vendor/bin
mkdir -p $BUILD_DIR $CACHE_DIR ${BUNDLE_DIR} ${BUILD_DIR}/local ${BUILD_DIR}/vendor/bin ${COMPOSER_HOME}

echo "-----> Fetching Manifest"
pushd ${BUNDLE_DIR} > /dev/null
Expand Down Expand Up @@ -180,7 +181,7 @@ then

# do the deed!
echo "Running: php composer.phar install" | indent
LD_LIBRARY_PATH="${BUILD_DIR}/local/lib" ${BUILD_DIR}/vendor/php/bin/php composer.phar install | indent
LD_LIBRARY_PATH="${BUILD_DIR}/local/lib" ${BUILD_DIR}/vendor/php/bin/php composer.phar install -n | indent

export GIT_DIR=$GIT_DIR_ORIG
fi
Expand Down
2 changes: 1 addition & 1 deletion bin/detect
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

if [ -f $1/index.php ]; then
if [ `find "$1" -type f -iname "index.php" 2> /dev/null | wc -l` -ge 1 ]; then
echo "PHP" && exit 0
else
echo "no" && exit 1
Expand Down
2 changes: 1 addition & 1 deletion support/ec2-build-php.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
## EDIT
export S3_BUCKET="heroku-buildpack-php-tyler"
export LIBMCRYPT_VERSION="2.5.8"
export PHP_VERSION="5.4.4"
export PHP_VERSION="5.4.5"
export APC_VERSION="3.1.10"
export PHPREDIS_VERSION="2.2.1"
export LIBMEMCACHED_VERSION="1.0.7"
Expand Down
2 changes: 1 addition & 1 deletion support/set-env.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

export NGINX_VERSION="1.2.2"
export PHP_VERSION="5.4.4"
export PHP_VERSION="5.4.5"
export LIBMCRYPT_VERSION="2.5.8"
export LIBMEMCACHED_VERSION="1.0.7"
export NEWRELIC_VERSION="2.9.5.78"
Expand Down
2 changes: 2 additions & 0 deletions test/compile_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,6 @@ EOF
assertCaptured "Running: php composer.phar install"
assertCaptured "packforlan/packtest"
assertTrue "packforlan/packtest package exists" "[ -f ${BUILD_DIR}/vendor/packforlan/packtest/composer.json ]"

assertTrue "composer cache exists in cache dir" "[ -d ${CACHE_DIR}/.composer/cache ]"
}
11 changes: 11 additions & 0 deletions test/detect_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@ testDetect()
assertAppDetected "PHP"
}

testDeepDetect()
{
mkdir -p ${BUILD_DIR}/public_html
touch ${BUILD_DIR}/public_html/index.php

detect

assertCapturedSuccess
assertAppDetected "PHP"
}

testNoDetectPHP()
{
mkdir -p ${BUILD_DIR}/
Expand Down

0 comments on commit b135136

Please sign in to comment.