mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-01-31 03:11:57 +00:00
git-version: fix trunk branch detection
This commit is contained in:
parent
6ca780c12d
commit
54ee51d41d
@ -30,7 +30,7 @@ esac
|
|||||||
full_date="$month $day$suffix, $year"
|
full_date="$month $day$suffix, $year"
|
||||||
|
|
||||||
sha="$(git describe --abbrev=1)"
|
sha="$(git describe --abbrev=1)"
|
||||||
if git describe --all --match trunk > /dev/null 2> /dev/null; then
|
if [ "$(git branch --show-current)" = "trunk" ]; then
|
||||||
sha=$(echo "$sha" | sed 's/-g[^-]*$//')
|
sha=$(echo "$sha" | sed 's/-g[^-]*$//')
|
||||||
fi
|
fi
|
||||||
version="$sha"
|
version="$sha"
|
||||||
|
Loading…
Reference in New Issue
Block a user