Skip to content

Commit

Permalink
Use ChangeLog date instead of build date
Browse files Browse the repository at this point in the history
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.
This date call only works with GNU date and BSD date.

This patch was done while working on reproducible builds for openSUSE, sponsored by the NLnet NGI0 fund.
  • Loading branch information
bmwiedemann committed Aug 7, 2024
1 parent 6174c45 commit 7f6b34f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ else
DEB_PACKAGE_NAME := $(BINARY_NAME)
endif

DATE := $(shell date -u '+%Y-%m-%d-%H%M UTC')
DATE := $(shell date -u -r RELEASE_NOTES '+%Y-%m-%d-%H%M UTC')
VERSION_FLAGS := -X "main.Version=$(VERSION)" -X "main.BuildTime=$(DATE)"
ifdef PACKAGE_MANAGER
VERSION_FLAGS := $(VERSION_FLAGS) -X "github.com/cloudflare/cloudflared/cmd/cloudflared/updater.BuiltForPackageManager=$(PACKAGE_MANAGER)"
Expand Down

0 comments on commit 7f6b34f

Please sign in to comment.