Skip to content

Instantly share code, notes, and snippets.

@qqli007
Created January 24, 2018 14:59
Show Gist options
  • Save qqli007/e85762699dbd85afcf87ce6458cd9afa to your computer and use it in GitHub Desktop.
Save qqli007/e85762699dbd85afcf87ce6458cd9afa to your computer and use it in GitHub Desktop.
nvm-update
#!/bin/sh
set -e
cd ~/.nvm
git fetch --tags
TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
echo "Checking out tag $TAG..."
git checkout "$TAG"
source ~/.nvm/nvm.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment