mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
Fix the current working directory when setting GITREV and
GITBRANCH. Sponsored by: Rubicon Communications, LLC (netgate.com)
This commit is contained in:
parent
64f0728e67
commit
2b65ed0302
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/projects/release-git/; revision=364778
|
@ -16,11 +16,11 @@ GIT_CMD= ${_P}/git
|
|||
|
||||
# Set the git branch and hash to export where needed.
|
||||
.if !defined(GITBRANCH) || empty(GITBRANCH)
|
||||
GITBRANCH!= ${GIT_CMD} rev-parse --abbrev-ref HEAD 2>/dev/null | sed -e 's/\^\///'
|
||||
GITBRANCH!= cd ${.CURDIR} && ${GIT_CMD} rev-parse --abbrev-ref HEAD 2>/dev/null | sed -e 's/\^\///'
|
||||
.export GITBRANCH
|
||||
.endif
|
||||
.if !defined(GITREV) || empty(GITREV)
|
||||
GITREV!= ${GIT_CMD} rev-parse --verify --short HEAD 2>/dev/null || true
|
||||
GITREV!= cd ${.CURDIR} && ${GIT_CMD} rev-parse --verify --short HEAD 2>/dev/null || true
|
||||
.export GITREV
|
||||
.endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue