Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'cje-production/mbscripts/mb010_createEnvfiles.sh')
-rwxr-xr-xcje-production/mbscripts/mb010_createEnvfiles.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/cje-production/mbscripts/mb010_createEnvfiles.sh b/cje-production/mbscripts/mb010_createEnvfiles.sh
index eb6228d33..3a6320acb 100755
--- a/cje-production/mbscripts/mb010_createEnvfiles.sh
+++ b/cje-production/mbscripts/mb010_createEnvfiles.sh
@@ -39,7 +39,14 @@ fn-addToPropFiles ()
}
echo "#!/bin/bash" >> $BUILD_ENV_FILE
-fn-addToPropFiles TIMESTAMP "\"$(date +%Y%m%d-%H%M --date='@'$(date +%s))\""
+
+# We set RAWDATE first thing here to make the "start of build" timestamp more accurate.
+# Note that a roundup is added to compensate the occasional delay.
+RAWDATE=$(date +%s)
+REMAINDER=$((RAWDATE % 600))
+RAWDATE_TRUNC=$((RAWDATE - REMAINDER))
+export RAWDATE
+fn-addToPropFiles TIMESTAMP "\"$(date +%Y%m%d-%H%M --date='@'$RAWDATE_TRUNC)\""
while read propLine
do

Back to the top