Skip to content
Myr

Ensure after node v4.0 is released, `stable` will simply refer to the latest node.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Jordan Harband · committed by Jordan Harband · parent b7e2d7d · Browse files · 2 files+46 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+46 added−4 removed

  • tests:+36 added−0 removed
  • other:+10 added−4 removed

2 files+46 added−4 removed

modified:test/fast/Unit tests/nvm_print_implicit_alias success+36 added
6 unmodified lines
7 rm -rf ../../../v0.4.68 rm -rf ../../../v0.5.79 rm -rf ../../../v0.7.710 rm -rf ../../../versions/io.js/v0.98.011 rm -rf ../../../versions/node/v1.0.012 rm -rf ../../../versions/node/v1.1.013 unset -f nvm_ls_remote nvm_ls_remote_iojs14}1516. ../../../nvm.sh
16 unmodified lines
3334LATEST_IOJS="$(nvm_print_implicit_alias local iojs)"35[ "_$LATEST_IOJS" = "_iojs-v0.98" ] || die "local iojs is not latest iojs: expected iojs-v0.98, got $LATEST_IOJS"3637## node post v1.0/io.js merger ##38mkdir -p ../../../versions/node/v1.0.039mkdir -p ../../../versions/node/v1.1.04041LATEST_STABLE="$(nvm_print_implicit_alias local stable)"42[ "_$LATEST_STABLE" = "_1.1" ] || die "local stable when post-v1.0 exists is not latest: expected 1.1, got $LATEST_STABLE"4344LATEST_UNSTABLE="$(nvm_print_implicit_alias local unstable)"45[ "_$LATEST_UNSTABLE" = "_0.7" ] || die "local unstable is not latest pre-v1.0 odd minor: expected 0.7, got $LATEST_UNSTABLE"46## ** ##4748nvm_ls_remote() {49 echo "v0.4.3"50 echo "v0.5.4"51 echo "v0.6.6"
25 unmodified lines
7778LATEST_IOJS="$(nvm_print_implicit_alias remote iojs)"79[ "_$LATEST_IOJS" = "_iojs-v0.99" ] || die "remote iojs is not latest: expected iojs-v0.99, got $LATEST_IOJS"8081## node post v1.0/io.js merger ##82nvm_ls_remote() {83 echo "v0.4.3"84 echo "v0.5.4"85 echo "v0.6.6"86 echo "v0.7.7"87 echo "v0.9.7"88 echo "v0.4.3"89 echo "v0.5.4"90 echo "v0.6.6"91 echo "v0.7.7"92 echo "v0.9.7"93 echo "v1.0.0"94 echo "v1.1.0"95}9697LATEST_STABLE="$(nvm_print_implicit_alias remote stable)"98[ "_$LATEST_STABLE" = "_1.1" ] || die "remote stable when post-v1.0 exists is not latest: expected 1.1, got $LATEST_STABLE"99100LATEST_UNSTABLE="$(nvm_print_implicit_alias remote unstable)"101[ "_$LATEST_UNSTABLE" = "_0.9" ] || die "remote unstable is not latest odd pre-v1.0 minor: expected 0.9, got $LATEST_UNSTABLE"102## ** ##103104cleanup105
modified:nvm.sh+10 added-4 removed
850 unmodified lines
851 local MINOR852 local STABLE853 local UNSTABLE854 local MOD855 local NORMALIZED_VERSION856857 ZHS_HAS_SHWORDSPLIT_UNSET=1858 if nvm_has "setopt"; then859 ZHS_HAS_SHWORDSPLIT_UNSET=$(setopt | command grep shwordsplit > /dev/null ; echo $?)860 setopt shwordsplit861 fi862 for MINOR in $LAST_TWO; do862 MOD=$(expr "$(nvm_normalize_version "$MINOR")" \/ 1000000 \% 2)863 if [ $MOD -eq 0 ]; then863 NORMALIZED_VERSION="$(nvm_normalize_version "$MINOR")"864 if [ "_0${NORMALIZED_VERSION#?}" != "_$NORMALIZED_VERSION" ]; then865 STABLE="$MINOR"866 else867 MOD=$(expr "$NORMALIZED_VERSION" \/ 1000000 \% 2)868 if [ $MOD -eq 0 ]; then869 STABLE="$MINOR"865 elif [ $MOD -eq 1 ]; then866 UNSTABLE="$MINOR"870 elif [ $MOD -eq 1 ]; then871 UNSTABLE="$MINOR"872 fi873 fi874 done875 if [ $ZHS_HAS_SHWORDSPLIT_UNSET -eq 1 ] && nvm_has "unsetopt"; then876 unsetopt shwordsplit
1054 unmodified lines