New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support reproducible builds #495

Merged
merged 1 commit into from Dec 7, 2017
Jump to file or symbol
Failed to load files and symbols.
+3 −1
Diff settings

Always

Just for now

Copy path View file
@@ -6,7 +6,9 @@ EXECUTABLE := gopass
PWD := $(shell pwd)
VERSION := $(shell cat VERSION)
SHA := $(shell cat COMMIT 2>/dev/null || git rev-parse --short=8 HEAD)
DATE := $(shell date -u '+%FT%T%z')
# Support reproducible builds by embedding date according to SOURCE_DATE_EPOCH if present
DATE := $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" '+%FT%T%z' 2>/dev/null || date -u '+%FT%T%z')
GOLDFLAGS += -X "main.version=$(VERSION)"
GOLDFLAGS += -X "main.date=$(DATE)"
ProTip! Use n and p to navigate between commits in a pull request.