Cloudy & Associates
Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cloudy
cloudy
Commits
c0d765fc
Commit
c0d765fc
authored
Oct 20, 2022
by
Chatzikos, Marios
Browse files
Merge branch 'gitversion' into 'master'
Fix bug in gitversion.sh See merge request
!47
parents
9d622692
fb668690
Changes
1
Hide whitespace changes
Inline
Side-by-side
source/gitversion.sh
View file @
c0d765fc
...
...
@@ -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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment