Skip to content

Commit

Permalink
release: include GIT_BUILT_FROM_COMMIT in MacOS build
Browse files Browse the repository at this point in the history
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 <vdye@github.com>
  • Loading branch information
vdye authored and ldennington committed Jan 20, 2022
1 parent 3cbdcff commit dd9c4c1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build-git-installers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down

0 comments on commit dd9c4c1

Please sign in to comment.