Skip to content

Commit

Permalink
bazel: support using SOURCE_DATE_EPOCH to override date
Browse files Browse the repository at this point in the history
  • Loading branch information
ixdy committed Feb 9, 2018
1 parent 30f54b4 commit c0d0c7b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hack/print-workspace-status.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,7 @@ gitTreeState ${KUBE_GIT_TREE_STATE-}
gitVersion ${KUBE_GIT_VERSION-}
gitMajor ${KUBE_GIT_MAJOR-}
gitMinor ${KUBE_GIT_MINOR-}
buildDate $(date -u +'%Y-%m-%dT%H:%M:%SZ')
buildDate $(date \
${SOURCE_DATE_EPOCH:+"--date=@${SOURCE_DATE_EPOCH}"} \
-u +'%Y-%m-%dT%H:%M:%SZ')
EOF

0 comments on commit c0d0c7b

Please sign in to comment.