Skip to content

Conversation

szepeviktor
Copy link

How about a function that runs a command in old and new?

Comment on lines -16 to -17
rm -rf old/.wp-env.override.json
rm -rf new/.wp-env.override.json
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are no directories here.

if [[ "$OLD_VERSION" == *".zip"* ]]; then
echo "{\"core\":\"$OLD_VERSION\"}" >> old/.wp-env.override.json
if [[ $OLD_VERSION == *.zip* ]]; then
printf '{"core":"%s"}' "$OLD_VERSION" >> old/.wp-env.override.json
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

printf is the master at mixing literals with variables 👴🏻

npm run research --silent -- benchmark-server-timing -u http://localhost:8891/ -n 100 -p -o csv > after.csv
node ../scripts/results.js "Server-Timing (Block Theme)" before.csv after.csv

cd -
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes to the previous working directory

@swissspidy
Copy link
Owner

Thanks 👍 There‘s definitely a lot of room for improvement in this script if I‘ll keep it around.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants