Skip to content

Commit

Permalink
log task names to stderr too, #408
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Nov 12, 2024
1 parent ecbc5d9 commit da349eb
Showing 1 changed file with 18 additions and 13 deletions.
31 changes: 18 additions & 13 deletions bin/daily-grunt-work.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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 ../../..
Expand All @@ -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
Expand All @@ -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"
logWithStderr "TASK - DAILY GRUNT WORK COMPLETE"

0 comments on commit da349eb

Please sign in to comment.