-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve run.sh #5
base: main
Are you sure you want to change the base?
Conversation
rm -rf old/.wp-env.override.json | ||
rm -rf new/.wp-env.override.json |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 👴🏻
@@ -105,9 +105,10 @@ npm run research --silent -- benchmark-server-timing -u http://localhost:8881/ | |||
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 - |
There was a problem hiding this comment.
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
Thanks 👍 There‘s definitely a lot of room for improvement in this script if I‘ll keep it around. |
How about a function that runs a command in
old
andnew
?