GIT EPOCH/DATETIME -> TIMESTAMP

This commit is contained in:
Lance Vick 2023-02-12 21:36:05 -08:00
parent 770c4add58
commit 6961056dd3
Signed by: lrvick
GPG Key ID: 8E47A1EC35A1551D
2 changed files with 7 additions and 10 deletions

View File

@ -9,9 +9,7 @@ CPUS := $(shell docker run -it debian nproc)
GIT_REF := $(shell git log -1 --format=%H)
GIT_AUTHOR := $(shell git log -1 --format=%an)
GIT_KEY := $(shell git log -1 --format=%GP)
GIT_EPOCH := $(shell git log -1 --format=%at)
GIT_DATETIME := \
$(shell git log -1 --format=%cd --date=format:'%Y-%m-%d %H:%M:%S' config)
GIT_TIMESTAMP := $(shell git log -1 --format=%cd --date=iso)
ifeq ($(strip $(shell git status --porcelain 2>/dev/null)),)
GIT_STATE=clean
else
@ -138,11 +136,11 @@ $(DIST_DIR)/manifest.txt: \
cp $(OUT_DIR)/manifest.txt $(DIST_DIR)/manifest.txt
$(OUT_DIR)/release.env: | $(OUT_DIR)
echo 'VERSION=$(VERSION)' > $(OUT_DIR)/release.env
echo 'GIT_REF=$(GIT_REF)' >> $(OUT_DIR)/release.env
echo 'GIT_AUTHOR=$(GIT_AUTHOR)' >> $(OUT_DIR)/release.env
echo 'GIT_KEY=$(GIT_KEY)' >> $(OUT_DIR)/release.env
echo 'GIT_DATETIME=$(GIT_DATETIME)' >> $(OUT_DIR)/release.env
echo 'VERSION=$(VERSION)' > $(OUT_DIR)/release.env
echo 'GIT_REF=$(GIT_REF)' >> $(OUT_DIR)/release.env
echo 'GIT_AUTHOR=$(GIT_AUTHOR)' >> $(OUT_DIR)/release.env
echo 'GIT_KEY=$(GIT_KEY)' >> $(OUT_DIR)/release.env
echo 'GIT_TIMESTAMP=$(GIT_TIMESTAMP)' >> $(OUT_DIR)/release.env
$(OUT_DIR)/manifest.txt: | $(OUT_DIR)
find $(OUT_DIR) \

View File

@ -14,8 +14,7 @@ cat <<- EOF
GIT_REF=${GIT_REF}
GIT_AUTHOR=${GIT_AUTHOR}
GIT_KEY=${GIT_KEY}
GIT_DATETIME=${GIT_DATETIME}
GIT_EPOCH=${GIT_EPOCH}
GIT_TIMESTAMP=${GIT_DATETIME}
FAKETIME_FMT=%s
SOURCE_DATE_EPOCH=1
KBUILD_BUILD_TIMESTAMP=1970-01-01 00:00:00 UTC