зеркало из https://github.com/microsoft/git.git
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 <vdye@github.com>
This commit is contained in:
Родитель
7037e19601
Коммит
ea7d1159d9
|
@ -21,7 +21,7 @@ BUILD_CODE := intel-$(ARCH_CODE)
|
|||
BUILD_DIR := $(GITHUB_WORKSPACE)/payload
|
||||
DESTDIR := $(PWD)/stage/git-$(BUILD_CODE)-$(VERSION)
|
||||
ARTIFACTDIR := build_artifacts
|
||||
SUBMAKE := $(MAKE) C_INCLUDE_PATH="$(C_INCLUDE_PATH)" CPLUS_INCLUDE_PATH="$(CPLUS_INCLUDE_PATH)" LD_LIBRARY_PATH="$(LD_LIBRARY_PATH)" TARGET_FLAGS="$(TARGET_FLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" NO_GETTEXT=1 NO_DARWIN_PORTS=1 prefix=$(GIT_PREFIX) DESTDIR=$(DESTDIR)
|
||||
SUBMAKE := $(MAKE) C_INCLUDE_PATH="$(C_INCLUDE_PATH)" CPLUS_INCLUDE_PATH="$(CPLUS_INCLUDE_PATH)" LD_LIBRARY_PATH="$(LD_LIBRARY_PATH)" TARGET_FLAGS="$(TARGET_FLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" NO_GETTEXT=1 NO_DARWIN_PORTS=1 prefix=$(GIT_PREFIX) GIT_BUILT_FROM_COMMIT="$(GIT_BUILT_FROM_COMMIT)" DESTDIR=$(DESTDIR)
|
||||
CORES := $(shell bash -c "sysctl hw.ncpu | awk '{print \$$2}'")
|
||||
|
||||
.PHONY: image pkg payload
|
||||
|
|
|
@ -332,6 +332,9 @@ jobs:
|
|||
echo "${{ needs.prereqs.outputs.tag_version }}" >>git/version
|
||||
make -C git -j$(sysctl -n hw.physicalcpu) GIT-VERSION-FILE dist dist-doc
|
||||
|
||||
export GIT_BUILT_FROM_COMMIT=$(gunzip -c git/git-$VERSION.tar.gz | git get-tar-commit-id) ||
|
||||
die "Could not determine commit for build"
|
||||
|
||||
# Extract tarballs
|
||||
mkdir payload manpages
|
||||
tar -xvf git/git-$VERSION.tar.gz -C payload
|
||||
|
|
Загрузка…
Ссылка в новой задаче