Skip to content
This repository has been archived by the owner on Feb 28, 2019. It is now read-only.

Commit

Permalink
Add alternate nvm detection for travis
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Skillington committed Aug 20, 2018
1 parent 05abdf5 commit aa344b3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go:
install: make install-ci
env:
# Set higher timeouts and package name for travis
- TEST_TIMEOUT_SCALE=20 PACKAGE=github.com/m3db/m3ctl
- TEST_TIMEOUT_SCALE=20 PACKAGE=github.com/m3db/m3ctl NPROC=2
sudo: required
dist: trusty
script:
Expand Down
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,12 @@ services-linux-amd64:
$(LINUX_AMD64_ENV) make services

cmd-using-node-version:
ifneq ($(shell type nvm 2>/dev/null || brew --prefix nvm 2>/dev/null),)
ifneq ($(shell brew --prefix nvm 2>/dev/null),)
@echo "Using nvm from brew to select node version $(node_version)"
source $(shell brew --prefix nvm)/nvm.sh && nvm use $(node_version) && bash -c "$(node_cmd)"
else ifneq ($(shell type nvm 2>/dev/null),)
@echo "Using nvm to select node version $(node_version)"
(type nvm 1>/dev/null 2>/dev/null || source $(shell brew --prefix nvm)/nvm.sh) && nvm use $(node_version) && bash -c "$(node_cmd)"
nvm use $(node_version) && bash -c "$(node_cmd)"
else
@echo "Not using nvm, using node version $(shell node --version)"
bash -c "$(node_cmd)"
Expand Down

0 comments on commit aa344b3

Please sign in to comment.