From da349eb8bdd870636d8f71d0d3b398e8957445a7 Mon Sep 17 00:00:00 2001 From: Michael Kauzmann Date: Tue, 12 Nov 2024 15:19:50 -0700 Subject: [PATCH] log task names to stderr too, https://github.com/phetsims/perennial/issues/408 --- bin/daily-grunt-work.sh | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/bin/daily-grunt-work.sh b/bin/daily-grunt-work.sh index 3b88017f..c0744985 100755 --- a/bin/daily-grunt-work.sh +++ b/bin/daily-grunt-work.sh @@ -22,6 +22,11 @@ binDir="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" workingDir=${binDir}/../.. cd ${workingDir} || exit +# Log to both out and err, so that it shows up in the error logs +function logWithStderr(){ + echo $1 | tee >(cat >&2) +} + echo "running daily grunt work. . ." date @@ -43,25 +48,25 @@ cd .. ########################################################################################################### # update-copyright-dates -echo "TASK - COPYRIGHT UPDATES:" +logWithStderr "TASK - COPYRIGHT UPDATES:" copyrightUpdateCommand="grunt update-copyright-dates && git commit -am 'update copyright dates from daily grunt work' --no-verify && git push" perennial/bin/for-each.sh perennial/data/active-repos "${copyrightUpdateCommand}" ########################################################################################################### # report third party -echo "TASK - THIRD PARTY REPORT:" +logWithStderr "TASK - THIRD PARTY REPORT:" cd chipper || exit grunt report-third-party cd ../sherpa || exit git pull -echo "TASK - report third party done, potentially committing" +logWithStderr "TASK - report third party done, potentially committing" git commit -am "Update third-party-licenses from daily grunt work" --no-verify git push cd .. ########################################################################################################## # Update responsible dev/designer markdown output -echo "TASK - RESPONSIBLE DEV MARKDOWN:" +logWithStderr "TASK - RESPONSIBLE DEV MARKDOWN:" perennial/bin/sage run ./phet-info/sim-info/generateMarkdownOutput.mjs cd phet-info || exit git commit -am "Update responsible_dev markdown output from daily grunt work" --no-verify @@ -70,21 +75,21 @@ cd .. ########################################################################################################## # Update perennial/data/ lists, make sure to npm prune and update first see https://github.com/phetsims/perennial/issues/155 -echo "TASK - GENERATE DATA LISTS:" +logWithStderr "TASK - GENERATE DATA LISTS:" cd perennial || exit grunt generate-data cd .. ########################################################################################################## # Update perennial/data/ lists, make sure to npm prune and update first see https://github.com/phetsims/perennial/issues/155 -echo "TASK - REOPEN ISSUES LINKED IN TODOS:" +logWithStderr "TASK - REOPEN ISSUES LINKED IN TODOS:" cd perennial || exit bin/sage run js/scripts/reopen-issues-from-todos.ts cd .. ########################################################################################################## -echo "TASK - GENERATE DEVELOPMENT STRINGS:" +logWithStderr "TASK - GENERATE DEVELOPMENT STRINGS:" perennial/bin/for-each.sh perennial/data/active-repos grunt generate-development-strings cd babel || exit git add ./_generated_development_strings # cover newly created files @@ -94,7 +99,7 @@ cd .. ########################################################################################################## -echo "TASK - BUILD SKIFFLE:" +logWithStderr "TASK - BUILD SKIFFLE:" cd skiffle || exit grunt git commit -am "Update skiffle build from daily grunt work" --no-verify @@ -103,14 +108,14 @@ cd .. ########################################################################################################## -echo "TASK - PUBLISH LATEST PHET_IO LINKS:" +logWithStderr "TASK - PUBLISH LATEST PHET_IO LINKS:" cd perennial || exit bin/sage run js/scripts/publish-phet-io-latest-links.js /data/web/htdocs/dev/phet-io/latest cd .. ########################################################################################################## -echo "TASK - UPDATE LOCALE INFO FILES" +logWithStderr "TASK - UPDATE LOCALE INFO FILES" cd chipper/js/data || exit ../perennial/bin/sage run updateLocaleInfo.js cd ../../.. @@ -129,7 +134,7 @@ cd ../../.. ########################################################################################################### # regenerate documentation # Binder is less important, and it also has been known to have a hard failure (rarely). So put it towards the end. -echo "TASK - BINDER DOC:" +logWithStderr "TASK - BINDER DOC:" cd binder || exit npm prune && npm update npm run build @@ -143,8 +148,8 @@ cd .. ########################################################################################################## # No grunt work below this point. # Final clean up steps, just to be sure -echo "TASK - PUSH ALL CLEANUP:" +logWithStderr "TASK - PUSH ALL CLEANUP:" perennial/bin/sage run perennial/js/scripts/pull-all.js perennial/bin/sage run perennial/js/scripts/push-all.js date -echo "TASK - DAILY GRUNT WORK COMPLETE" \ No newline at end of file +logWithStderr "TASK - DAILY GRUNT WORK COMPLETE" \ No newline at end of file