🔨 Scripted build/archive multiple envs (2)

This commit is contained in:
Scott Lahteine 2024-12-15 23:25:10 -06:00
parent d5dfd18c24
commit c0becd6ce1
3 changed files with 7 additions and 6 deletions

View file

@ -184,7 +184,7 @@ find -ds "$CBASE"/config/examples -type d -name 'Configuration.h' -o -name 'Conf
((CEXPORT)) && CARGS+=("-e" "$CEXPORT")
# Build many environments? Add -m argument
((NOFAIL)) && CARGS+=("-m")
((MANY)) && CARGS+=("-m")
# Continue on fail? Add -f argument
((NOFAIL)) && CARGS+=("-f")

View file

@ -211,22 +211,23 @@ while ((1)); do
# "Index out of range" can fail without an error
((MANY)) && ((ERR == 66)) && ERR=0 && break # "index out of range"
# Short message reporting Error or Success
((ERR)) && alrt "Failed ($ERR)" || annc "Success"
set -e
if [[ $ERR -gt 0 ]]; then
alrt "Failed ($ERR)"
# Error? For --nofail simply log. Otherwise return the error.
if [[ -n $NOFAIL ]]; then
date +"%F %T [FAIL] $CONFIG" >>./.pio/error-log.txt
date +"%F %T [FAIL] $CONFIG ($BUILDINDEX)" >>./.pio/error-log.txt
else
exit $ERR
fi
else
annc "Success"
# Copy exports back to the configs
if [[ -n $EXPNUM ]]; then
annc "Exporting $EXPNUM"

View file

@ -364,7 +364,7 @@ f'''#
with config_h.open('w') as outfile:
filegrp = { 'Configuration.h':'config:basic', 'Configuration_adv.h':'config:advanced' }
vers = build_defines["CONFIGURATION_H_VERSION"]
dt_string = datetime.now().strftime("%Y-%m-%d at %H:%M:%S")
dt_string = datetime.utcnow().strftime("%Y-%m-%d at %H:%M:%S")
out_text = f'''/**
* Config.h - Marlin Firmware distilled configuration