mirror of
https://github.com/monero-project/monero.git
synced 2024-12-25 22:19:26 -05:00
15 lines
285 B
Bash
15 lines
285 B
Bash
#!/usr/bin/env bash
|
|
|
|
git_root() {
|
|
git rev-parse --show-toplevel 2> /dev/null
|
|
}
|
|
|
|
git_head_version() {
|
|
local recent_tag
|
|
if recent_tag="$(git describe --exact-match HEAD 2> /dev/null)"; then
|
|
echo "${recent_tag}"
|
|
else
|
|
git rev-parse --short=12 HEAD
|
|
fi
|
|
}
|