Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/utility/git-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -154,15 +154,15 @@ function latestRemoteTag() {
if (($# > 2)); then
logError "Maximum 2 arguments can be passed to latestRemoteTag, given \033[0;36m%s\033[0m\n" "$#"
echo >&2 '1: remote (optional) the name of the remote, defaults to origin'
echo >&2 '2: tagFilter (optional) a regex pattern (as supported by grep -E) which allows to filter available tags before determining the latest, defaults to .* (i.e. include all)'
echo >&2 '2: tagFilter (optional) a regex pattern (as supported by grep -P) which allows to filter available tags before determining the latest, defaults to .* (i.e. include all)'
printStackTrace
exit 9
fi
local -r remote=${1:-"origin"}
local -r tagFilter=${2:-".*"}
local tag
#shellcheck disable=SC2310 # we are aware of that || will disable set -e for remoteTagsSorted
tag=$(remoteTagsSorted "$remote" | grep -E "$tagFilter" | tail -n 1) || die "could not get remote tags sorted for remote %s, see above" "$remote"
tag=$(remoteTagsSorted "$remote" | grep -P "$tagFilter" | tail -n 1) || die "could not get remote tags sorted for remote %s, see above" "$remote"
if [[ -z $tag ]]; then
die "looks like remote \033[0;36m%s\033[0m does not have a tag yet." "$remote"
fi
Expand Down