From 987bead03415e950dba2ace88477240059b746fe Mon Sep 17 00:00:00 2001 From: Johannes Layher Date: Fri, 11 Aug 2017 19:23:41 +0200 Subject: [PATCH] fix formatting --- src/git-tag-version | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/git-tag-version b/src/git-tag-version index c96f73f..fa93b0a 100755 --- a/src/git-tag-version +++ b/src/git-tag-version @@ -164,12 +164,12 @@ EXAMPLES # print red error messages to stderr function echo-error() { - (>&2 echo -e "\e[31m$1\e[0m") + (echo >&2 -e "\e[31m$1\e[0m") } # print yellow warning messages to stderr function echo-warning() { - (>&2 echo -e "\e[33m$1\e[0m") + (echo >&2 -e "\e[33m$1\e[0m") } # show version @@ -241,7 +241,7 @@ function new-unique-version() { nextVersion=$(strictly-increasing-version "$1" "$nextVersion") # omit any output of 'git tag' at all, since this ruins our echo-as-return-value scheme - if git tag --list 'v*' -n1 | grep -E "^v[0-9]+.[0-9]+.[0-9]+.*\s+version [0-9]+.[0-9]+.[0-9]+" | grep -o &> /dev/null "$nextVersion"; then + if git tag --list 'v*' -n1 | grep -E "^v[0-9]+.[0-9]+.[0-9]+.*\s+version [0-9]+.[0-9]+.[0-9]+" | grep -o "$nextVersion" &>/dev/null; then echo-warning "New version '$nextVersion' for this branch is already present in this repository. Trying next available version." else echo "$nextVersion"