mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2024-12-26 08:52:16 +00:00
abuild: Respect $reporev variable when fetching git repositories
For git repositories the $reporev variable is not really used since the $_rev variable is passed to git and $_rev was only set when $reporev was empty.
This commit is contained in:
parent
8d272af174
commit
578ab740ad
@ -2038,7 +2038,8 @@ snapshot() {
|
||||
local _version=${verbase:-0}_git${_date}
|
||||
command -v git >/dev/null || \
|
||||
die "Missing git! Install git to support git clone."
|
||||
[ -z "$reporev" ] && local _rev="HEAD" && local _depth="--depth=1"
|
||||
local _rev="${reporev:-HEAD}"
|
||||
[ "$_rev" = "HEAD" ] && local _depth="--depth=1"
|
||||
msg "Creating git snapshot: $pkgname-$_version"
|
||||
git clone $_depth --bare $giturl $pkgname-$_version || return 1
|
||||
git --git-dir $pkgname-$_version archive \
|
||||
|
Loading…
Reference in New Issue
Block a user