Allow to override build date with SOURCE_DATE_EPOCH (#1099)
in order to make builds reproducible. See https://reproducible-builds.org/ for why this is good and https://reproducible-builds.org/specs/source-date-epoch/ for the definition of this variable. Also use UTC to be independent of timezone. This variant only works with GNU date. This was originally merged inmine23ac2b6c9fand then accidentally reverted ind31328a576
parent
3ea4ecabed
commit
f2ab9dc2f8
3
Makefile
3
Makefile
|
|
@ -1,7 +1,8 @@
|
|||
NAME := k9s
|
||||
PACKAGE := github.com/derailed/$(NAME)
|
||||
GIT := $(shell git rev-parse --short HEAD)
|
||||
DATE := $(shell date -u +"%Y-%m-%dT%H:%M:%SZ")
|
||||
SOURCE_DATE_EPOCH ?= $(shell date +%s)
|
||||
DATE := $(shell date -u -d @${SOURCE_DATE_EPOCH} +"%Y-%m-%dT%H:%M:%SZ")
|
||||
VERSION ?= v0.24.7
|
||||
IMG_NAME := derailed/k9s
|
||||
IMAGE := ${IMG_NAME}:${VERSION}
|
||||
|
|
|
|||
Loading…
Reference in New Issue