Skip to content

Commit

Permalink
cross fingers now
Browse files Browse the repository at this point in the history
  • Loading branch information
jiaaro committed Mar 14, 2012
1 parent 0af38d1 commit 10bcc49
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bin/compile
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,6 @@ for dir in $VIRTUALENV_DIRS; do
cp -R $dir $CACHE_DIR/
done

if [ -f $1/package.json ]; then
if [ -f $1/npm_requirements.txt ]; then
source $BIN_DIR/compilenodejs $1 $2
fi
17 changes: 14 additions & 3 deletions bin/compilenodejs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,18 @@ function run_npm() {
fi
}

function run_npm_install_global() {
package="$1"

cd $BUILD_DIR
HOME="$BUILD_DIR" $VENDORED_NODE/bin/node $VENDORED_NPM/cli.js install -g $package 2>&1 | indent

if [ "${PIPESTATUS[*]}" != "0 0" ]; then
echo " ! Failed to install dependencies with npm"
exit 1
fi
}

function manifest_versions() {
curl "http://${S3_BUCKET}.s3.amazonaws.com/manifest.${1}" -s -o - | tr -s '\n' ' '
}
Expand All @@ -71,7 +83,7 @@ function resolve_version() {
}

function package_engine_version() {
version=$(cat $BUILD_DIR/package.json | $bootstrap_node/bin/node $LP_DIR/vendor/json/json engines.$1 2>/dev/null)
version=$(echo "{}" | $bootstrap_node/bin/node $LP_DIR/vendor/json/json engines.$1 2>/dev/null)
if [ $? == 0 ]; then
echo $version | sed -e 's/\([<>=]\) /\1/g'
fi
Expand Down Expand Up @@ -178,8 +190,7 @@ fi

# install dependencies with npm
echo "-----> Installing dependencies with npm"
run_npm "install"
run_npm "rebuild"
run_npm_install_global ${cat $1/npm_requirements.txt}
echo "Dependencies installed" | indent

# repack cache with new assets
Expand Down

0 comments on commit 10bcc49

Please sign in to comment.