From a24026f554dabbbd8a30517b497f7d7bc98aa8b8 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 9 Feb 2016 08:49:52 -0800 Subject: [PATCH] fix node artifact building on mac --- test/distrib/node/run_distrib_test.sh | 7 ++----- tools/jenkins/docker_run.sh | 2 -- tools/run_tests/build_artifact_node.sh | 6 +++++- tools/run_tests/build_package_node.sh | 3 +++ 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/test/distrib/node/run_distrib_test.sh b/test/distrib/node/run_distrib_test.sh index ac9e7d70907..99a51f01f76 100755 --- a/test/distrib/node/run_distrib_test.sh +++ b/test/distrib/node/run_distrib_test.sh @@ -28,15 +28,12 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +NODE_VERSION=$1 +source ~/.nvm/nvm.sh set -ex cd $(dirname $0) -NODE_VERSION="$1" - -# make sure nvm is available -source ~/.nvm/nvm.sh || true - nvm install $NODE_VERSION npm install -g node-static diff --git a/tools/jenkins/docker_run.sh b/tools/jenkins/docker_run.sh index 519dc5cade6..df7b6571d7a 100755 --- a/tools/jenkins/docker_run.sh +++ b/tools/jenkins/docker_run.sh @@ -47,8 +47,6 @@ then rvm use ruby-2.1 fi -nvm use 4 || true - cd /var/local/git/grpc $RUN_COMMAND diff --git a/tools/run_tests/build_artifact_node.sh b/tools/run_tests/build_artifact_node.sh index ec3fb6462f3..8aeec79d087 100755 --- a/tools/run_tests/build_artifact_node.sh +++ b/tools/run_tests/build_artifact_node.sh @@ -28,8 +28,12 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +NODE_TARGET_ARCH=$1 +source ~/.nvm/nvm.sh set -ex +nvm use 4 + cd $(dirname $0)/../.. rm -rf build @@ -42,6 +46,6 @@ node_versions=( 0.10.41 0.12.0 1.0.0 1.1.0 2.0.0 3.0.0 4.0.0 5.0.0 ) for version in ${node_versions[@]} do - node-pre-gyp configure rebuild package testpackage --target=$version --target_arch=$1 + node-pre-gyp configure rebuild package testpackage --target=$version --target_arch=$NODE_TARGET_ARCH cp -r build/stage/* artifacts/ done diff --git a/tools/run_tests/build_package_node.sh b/tools/run_tests/build_package_node.sh index 13587402647..a8b9448973f 100755 --- a/tools/run_tests/build_package_node.sh +++ b/tools/run_tests/build_package_node.sh @@ -28,8 +28,11 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +source ~/.nvm/nvm.sh set -ex +nvm use 4 + cd $(dirname $0)/../.. mkdir -p artifacts/