github.com/yggdrasil-network/yggdrasil-go@v0.5.6/contrib/semver/version.sh (about)

     1  #!/bin/sh
     2  
     3  case "$*" in
     4    *--bare*)
     5      # Remove the "v" prefix
     6      git describe --tags --match="v[0-9]*\.[0-9]*\.[0-9]*" | cut -c 2-
     7      ;;
     8    *)
     9      git describe --tags --match="v[0-9]*\.[0-9]*\.[0-9]*"
    10      ;;
    11  esac