Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Move CACHE_STORE_DIR assignment after setting NPM_VERSION
  • Loading branch information
lackac committed Feb 27, 2012
1 parent df6b204 commit 4d48184
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bin/compile
Expand Up @@ -18,8 +18,6 @@ S3_BUCKET="heroku-buildpack-nodejs"
BUILD_DIR=$1
CACHE_DIR=$2
LP_DIR=`cd $(dirname $0); cd ..; pwd`
CACHE_STORE_DIR="$CACHE_DIR/node_modules/$NPM_VERSION"
CACHE_TARGET_DIR="$BUILD_DIR/node_modules"

function error() {
echo " ! $*"
Expand Down Expand Up @@ -124,6 +122,10 @@ echo "Using Node.js version: ${NODE_VERSION}" | indent
NPM_VERSION=$(package_resolve_version "npm")
echo "Using npm version: ${NPM_VERSION}" | indent

# cache directories
CACHE_STORE_DIR="$CACHE_DIR/node_modules/$NPM_VERSION"
CACHE_TARGET_DIR="$BUILD_DIR/node_modules"

# s3 packages
NODE_PACKAGE="http://${S3_BUCKET}.s3.amazonaws.com/nodejs-${NODE_VERSION}.tgz"
NPM_PACKAGE="http://${S3_BUCKET}.s3.amazonaws.com/npm-${NPM_VERSION}.tgz"
Expand Down

0 comments on commit 4d48184

Please sign in to comment.