mirror of
https://github.com/bluekitchen/btstack.git
synced 2024-12-29 09:26:08 +00:00
18 lines
248 B
Bash
18 lines
248 B
Bash
|
#!/usr/bin/env sh
|
||
|
|
||
|
# get tag from git
|
||
|
tag=`git tag --points-at HEAD`
|
||
|
|
||
|
# get git version
|
||
|
commit=`git rev-parse --short HEAD`
|
||
|
|
||
|
# use tag if available
|
||
|
if [ -z "$tag" ]
|
||
|
then
|
||
|
version=${commit}
|
||
|
else
|
||
|
version=${tag}-${commit}
|
||
|
fi
|
||
|
|
||
|
echo "${version}"
|