We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 52a778e commit 6ef0a28Copy full SHA for 6ef0a28
.scripts/ds_version.sh
@@ -10,7 +10,10 @@ ds_version() {
10
# Get the branch
11
Branch="$(git symbolic-ref --short -q HEAD)"
12
# Get the current tag. If no tag, use the commit instead.
13
- Version="$(git describe --tags --exact-match 2> /dev/null)" || Version="commit $(git rev-parse --short HEAD)"
+ Version="$(git describe --tags --exact-match 2> /dev/null || true)"
14
+ if [[ -z ${Version} ]]; then
15
+ Version="commit $(git rev-parse --short HEAD)"
16
+ fi
17
18
echo "${Branch} ${Version}"
19
popd &> /dev/null
0 commit comments