Skip to content

Commit

Permalink
Merge pull request #534 from bmwiedemann/date
Browse files Browse the repository at this point in the history
Allow to override build date with SOURCE_DATE_EPOCH
  • Loading branch information
dougbtv authored Jul 9, 2020
2 parents e4a8c9f + 29df24f commit b5211cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if [ -z "$VERSION" ]; then
fi
set -e
fi
DATE=$(date --iso-8601=seconds)
DATE=$(date -u -d "@${SOURCE_DATE_EPOCH:-$(date +%s)}" --iso-8601=seconds)
COMMIT=${COMMIT:-$(git rev-parse --verify HEAD)}
LDFLAGS="-X main.version=${VERSION:-master} -X main.commit=${COMMIT} -X main.date=${DATE}"
export CGO_ENABLED=0
Expand Down

0 comments on commit b5211cb

Please sign in to comment.