THIS IS A TEST INSTANCE ONLY! REPOSITORIES CAN BE DELETED AT ANY TIME!

Git Source Code Mirror - This is a publish-only repository and all pull requests are ignored. Please follow Documentation/SubmittingPatches procedure for any of your improvements.
git
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

41 lines
756 B

  1. #!/bin/sh
  2. GVF=GIT-VERSION-FILE
  3. DEF_VER=v2.23.0-rc1
  4. LF='
  5. '
  6. # First see if there is a version file (included in release tarballs),
  7. # then try git-describe, then default.
  8. if test -f version
  9. then
  10. VN=$(cat version) || VN="$DEF_VER"
  11. elif test -d ${GIT_DIR:-.git} -o -f .git &&
  12. VN=$(git describe --match "v[0-9]*" HEAD 2>/dev/null) &&
  13. case "$VN" in
  14. *$LF*) (exit 1) ;;
  15. v[0-9]*)
  16. git update-index -q --refresh
  17. test -z "$(git diff-index --name-only HEAD --)" ||
  18. VN="$VN-dirty" ;;
  19. esac
  20. then
  21. VN=$(echo "$VN" | sed -e 's/-/./g');
  22. else
  23. VN="$DEF_VER"
  24. fi
  25. VN=$(expr "$VN" : v*'\(.*\)')
  26. if test -r $GVF
  27. then
  28. VC=$(sed -e 's/^GIT_VERSION = //' <$GVF)
  29. else
  30. VC=unset
  31. fi
  32. test "$VN" = "$VC" || {
  33. echo >&2 "GIT_VERSION = $VN"
  34. echo "GIT_VERSION = $VN" >$GVF
  35. }