Skip to content

Commit

Permalink
Use $CACHE_DIR for composer cache.
Browse files Browse the repository at this point in the history
  • Loading branch information
iphoting committed Jul 20, 2012
1 parent 5e0575a commit 09a2659
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bin/compile
Original file line number Diff line number Diff line change
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: 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 ]"
}

0 comments on commit 09a2659

Please sign in to comment.