Skip to content

Instantly share code, notes, and snippets.

@kaizhu256
Created May 1, 2018 06:31
Show Gist options
  • Select an option

  • Save kaizhu256/b6de8655f81b6463a93f53232d554244 to your computer and use it in GitHub Desktop.

Select an option

Save kaizhu256/b6de8655f81b6463a93f53232d554244 to your computer and use it in GitHub Desktop.
travis override $NODE_VERSION
before_install:
# override $NODE_VERSION
- printf "$NODE_VERSION\n" && if (printf "$CI_COMMIT_MESSAGE" | grep -qE "\bNODE_VERSION="); then nvm install "$(printf "$CI_COMMIT_MESSAGE" | sed -e "s/.*\bNODE_VERSION=//" -e "s/ .*//")" && printf "$NODE_VERSION\n" && node --version && npm --version; fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment