Skip to content

Commit

Permalink
add release type to version, closes #825
Browse files Browse the repository at this point in the history
  • Loading branch information
mpapis committed Mar 22, 2012
1 parent cde709f commit e59be6f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
17 changes: 11 additions & 6 deletions binscripts/rvm-installer
Original file line number Diff line number Diff line change
Expand Up @@ -301,28 +301,31 @@ done
# means was specified, if any. Defaults to head.
case "${version}" in
(head)
echo "${branch}" > "$rvm_path/RELEASE"
install_head ${branch:-master} || exit $?
;;

(latest)
install_release $(fetch_version "")
echo "${version}" > "$rvm_path/RELEASE"
install_release $(fetch_version "") || exit $?
;;

(latest-*)
install_release $(fetch_version "${version#latest-}")
echo "${version}" > "$rvm_path/RELEASE"
install_release $(fetch_version "${version#latest-}") || exit $?
;;

(+([[:digit:]]).+([[:digit:]]).+([[:digit:]])) # x.y.z
install_release ${version}
echo "version" > "$rvm_path/RELEASE"
install_release ${version} || exit $?
;;

(*)
fail "Something went wrong, unrecognized version '$version'"
;;
esac

# No matter which one we are doing we install the same way, using the RVM
# installer script.
# No matter which one we are doing we install the same way, using the RVM installer script.
flags=()
if (( rvm_trace_flag == 1 ))
then flags+=("--trace")
Expand All @@ -336,6 +339,8 @@ if (( rvm_auto_flag == 1 ))
then flags+=("--auto")
fi

# Now we run the RVM installer.
chmod +x ./scripts/install
./scripts/install ${flags[*]} --path "$rvm_path"

source ${rvm_scripts_path:-${rvm_path}/scripts}/version
__rvm_version
3 changes: 0 additions & 3 deletions scripts/get
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ get_via_installer()
{
bash -s -- $@ < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer) || return $?

rvm_log "\nInstalled RVM version:"
( source $rvm_scripts_path/rvm ; rvm --version )

typeset -x rvm_hook
rvm_hook="after_update"
source "$rvm_scripts_path/hook"
Expand Down
5 changes: 3 additions & 2 deletions scripts/version
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ __rvm_version()
{
__rvm_meta

typeset IFS
typeset IFS release
IFS=':'
rvm_meta_authors="${rvm_meta_authors[*]}"
rvm_meta_authors="${rvm_meta_authors//:/, }"
release=$(cat "$rvm_path/RELEASE" 2>/dev/null)

echo -e "\nrvm ${rvm_meta_version} by ${rvm_meta_authors} [${rvm_meta_website}]\n"
echo -e "\nrvm ${rvm_meta_version} (${release}) by ${rvm_meta_authors} [${rvm_meta_website}]\n"
}

0 comments on commit e59be6f

Please sign in to comment.