svn commit: r364778 - projects/release-git/release
Glen Barber
gjb at FreeBSD.org
Tue Aug 25 18:30:13 UTC 2020
Author: gjb
Date: Tue Aug 25 18:30:12 2020
New Revision: 364778
URL: https://svnweb.freebsd.org/changeset/base/364778
Log:
Fix the current working directory when setting GITREV and
GITBRANCH.
Sponsored by: Rubicon Communications, LLC (netgate.com)
Modified:
projects/release-git/release/Makefile.inc1
Modified: projects/release-git/release/Makefile.inc1
==============================================================================
--- projects/release-git/release/Makefile.inc1 Tue Aug 25 18:22:30 2020 (r364777)
+++ projects/release-git/release/Makefile.inc1 Tue Aug 25 18:30:12 2020 (r364778)
@@ -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
More information about the svn-src-projects
mailing list