svn commit: r364778 - projects/release-git/release
Renato Botelho
garga at FreeBSD.org
Tue Aug 25 22:35:45 UTC 2020
On 25/08/20 15:30, Glen Barber wrote:
> 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
Hi Glen!
It would be simpler if you use git -C parameter instead.
More information about the svn-src-projects
mailing list