From 6961056dd3a3826174c11bd08c381d81a1cba56f Mon Sep 17 00:00:00 2001 From: "Lance R. Vick" Date: Sun, 12 Feb 2023 21:36:05 -0800 Subject: [PATCH] GIT EPOCH/DATETIME -> TIMESTAMP --- Makefile | 14 ++++++-------- scripts/environment | 3 +-- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 3773ac9..0f31083 100644 --- a/Makefile +++ b/Makefile @@ -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) \ diff --git a/scripts/environment b/scripts/environment index 7c2aae9..883f0d4 100755 --- a/scripts/environment +++ b/scripts/environment @@ -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