Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

21 rader
535 B

11 år sedan
11 år sedan
11 år sedan
11 år sedan
  1. #!/usr/bin/env bash
  2. # Summary: Display the version of rbenv
  3. #
  4. # Displays the version number of this rbenv release, including the
  5. # current revision from git, if available.
  6. #
  7. # The format of the git revision is:
  8. # <version>-<num_commits>-<git_sha>
  9. # where `num_commits` is the number of commits since `version` was
  10. # tagged.
  11. set -e
  12. [ -n "$RBENV_DEBUG" ] && set -x
  13. version=0.3.0
  14. cd "$RBENV_ROOT"
  15. git_revision="$(git describe --tags HEAD 2>/dev/null || true)"
  16. git_revision="${git_revision#v}"
  17. echo "rbenv ${git_revision:-$version}"