mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2025-01-11 09:19:40 +00:00
abuild: microoptimization. call git describe only once
Use a global var for last_commit so we dont need call git for every subpackage
This commit is contained in:
parent
60de2a776a
commit
3c15749bd0
@ -808,10 +808,11 @@ EOF
|
||||
done
|
||||
fi
|
||||
|
||||
local last_commit="$(git_last_commit)$(git_dirty)"
|
||||
if [ -n "$last_commit" ]; then
|
||||
echo "commit = $last_commit" >> "$pkginfo"
|
||||
# store last_commit in global var so we only call git once
|
||||
if [ -z "$last_commit" ]; then
|
||||
last_commit="$(git_last_commit)$(git_dirty)"
|
||||
fi
|
||||
echo "commit = $last_commit" >> "$pkginfo"
|
||||
|
||||
get_maintainer
|
||||
if [ -n "$maintainer" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user