mirror of
https://github.com/bluekitchen/btstack.git
synced 2024-12-28 15:20:39 +00:00
18 lines
248 B
Bash
Executable File
18 lines
248 B
Bash
Executable File
#!/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}"
|