From e1e791a49283a13f87610e4b545e4aa66d30d162 Mon Sep 17 00:00:00 2001 From: Victoria Dye Date: Thu, 2 Dec 2021 14:50:05 -0500 Subject: [PATCH] release: include GIT_BUILT_FROM_COMMIT in MacOS build Set the `GIT_BUILT_FROM_COMMIT` based on the version specified in the `make dist` output archive header. This ensures the commit hash is shown in `git version --build-options`. Signed-off-by: Victoria Dye --- .github/workflows/build-git-installers.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build-git-installers.yml b/.github/workflows/build-git-installers.yml index 85fdd7be51a21d..663b468b162b69 100644 --- a/.github/workflows/build-git-installers.yml +++ b/.github/workflows/build-git-installers.yml @@ -354,6 +354,9 @@ jobs: cp git/git-$VERSION.tar.gz git/git-manpages-$VERSION.tar.gz git_osx_installer/build/ || die "Could not copy .tar.gz files" + GIT_BUILT_FROM_COMMIT=$(gunzip -c git/git-$VERSION.tar.gz | git get-tar-commit-id) || + die "Could not determine commit for build" + # drop the -isysroot `GIT_SDK` hack sed -i .bak -e 's/ -isysroot .(SDK_PATH)//' git_osx_installer/Makefile || die "Could not drop the -isysroot hack" @@ -371,6 +374,7 @@ jobs: PATH=/usr/local/bin:$PATH \ make -C git_osx_installer \ + GIT_BUILT_FROM_COMMIT=$GIT_BUILT_FROM_COMMIT \ OSX_VERSION=10.15 C_INCLUDE_PATH="$C_INCLUDE_PATH" V=1 image || die "Build failed"