Skip to content

Commit 98b7c23

Browse files
authored
Merge pull request #795 from unixorn/add-git-semvers
Add `git-semvers`
2 parents daeec4c + db2678f commit 98b7c23

File tree

1 file changed

+1
-31
lines changed

1 file changed

+1
-31
lines changed

bin/git-semvers

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,8 @@
11
#!/usr/bin/env bash
22
#
3-
# Originally from hangops slack
3+
# Author: Daniel Hoherd http://github.com/danielhoherd
44

55
set -o pipefail
66
set -e
77

8-
if [[ -n "$DEBUG" ]]; then
9-
# shellcheck disable=SC2086
10-
if [[ "$(echo $DEBUG | tr '[:upper:]' '[:lower:]')" == "verbose" ]]; then
11-
set -x
12-
fi
13-
fi
14-
15-
function debug() {
16-
if [[ -n "$DEBUG" ]]; then
17-
echo "$@"
18-
fi
19-
}
20-
21-
function echo-stderr() {
22-
echo "$@" 1>&2 ## Send message to stderr.
23-
}
24-
25-
function fail() {
26-
printf '%s\n' "$1" >&2 ## Send message to stderr. Exclude >&2 if you don't want it that way.
27-
exit "${2-1}" ## Return a code specified by $2 or 1 by default.
28-
}
29-
30-
function my-name() {
31-
basename "$0"
32-
}
33-
34-
function usage() {
35-
echo "Usage: $(my-name) ARG ARG"
36-
}
37-
388
git tag -l "v*.*.*" --sort=-v:refname | awk -F. '!seen[$1,$2]++'

0 commit comments

Comments
 (0)