diff --git a/bin/git-semvers b/bin/git-semvers index 5b695feb9..5811c30a2 100755 --- a/bin/git-semvers +++ b/bin/git-semvers @@ -1,38 +1,8 @@ #!/usr/bin/env bash # -# Originally from hangops slack +# Author: Daniel Hoherd http://github.com/danielhoherd set -o pipefail set -e -if [[ -n "$DEBUG" ]]; then - # shellcheck disable=SC2086 - if [[ "$(echo $DEBUG | tr '[:upper:]' '[:lower:]')" == "verbose" ]]; then - set -x - fi -fi - -function debug() { - if [[ -n "$DEBUG" ]]; then - echo "$@" - fi -} - -function echo-stderr() { - echo "$@" 1>&2 ## Send message to stderr. -} - -function fail() { - printf '%s\n' "$1" >&2 ## Send message to stderr. Exclude >&2 if you don't want it that way. - exit "${2-1}" ## Return a code specified by $2 or 1 by default. -} - -function my-name() { - basename "$0" -} - -function usage() { - echo "Usage: $(my-name) ARG ARG" -} - git tag -l "v*.*.*" --sort=-v:refname | awk -F. '!seen[$1,$2]++'