Commit 9be38bcc authored by anonym's avatar anonym

Fail builds started before SOURCE_DATE_EPOCH.

Such builds would not be reproducible, and this is an assumption (a
reasonable one!) that we do all over the place, so let's fail early.

Will-fix: #12352
parent 28cf0f43
......@@ -16,6 +16,14 @@ if [ -e config/amnesia.local ] ; then
. config/amnesia.local
if [ -n "${SOURCE_DATE_EPOCH}" ]; then
CURRENT_EPOCH="$(date --utc +%s)"
if [ "${SOURCE_DATE_EPOCH}" -gt "${CURRENT_EPOCH}" ]; then
echo "SOURCE_DATE_EPOCH is set before the current time. Exiting."
exit 1
# get git branch or tag so we can set the basename appropriately, i.e.:
# * if we build from a tag: tails-$ARCH-$TAG.iso
# * otherwise: tails-$ARCH-$BRANCH-$VERSION-$TIME-$COMMIT.iso
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment