Cloudy & Associates

Commit c0d765fc authored by Chatzikos, Marios's avatar Chatzikos, Marios
Browse files

Merge branch 'gitversion' into 'master'

Fix bug in gitversion.sh

See merge request !47
parents 9d622692 fb668690
......@@ -15,9 +15,15 @@
#
branch=`git branch | grep '^\*' | awk '{ print $2 }'`
branch=`echo $branch | sed 's/(no//'`
tag=`git describe --tags --abbrev=0 2> /dev/null`
if [ -z "$tag" ]; then
tag=`git log --oneline | head -n 1 | awk '{print $1}'`
fi
[[ -z "`git status -s -uno`" ]] && modified="" || modified="-modified"
echo $branch-$tag$modified
if [ -z "$branch" ];
then
echo $tag$modified
else
echo $branch-$tag$modified
fi
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment