Last active
August 9, 2020 19:17
-
-
Save mcsf/60385b1a2f712f50ef756cb0bdc8ef21 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -e | |
# Clean | |
if pgrep -f Docker.app ; then | |
echo "Please manually quit Docker and try again." | |
exit 1 | |
fi | |
# Prep | |
echo "Starting Docker daemon…" | |
open -a Docker | |
echo "Waiting for Docker to be ready…" | |
timeout 60 sh -c "until docker info; do echo .; sleep 1; done" &> /dev/null | |
echo "Starting wp-env…" | |
npx wp-env start &> /dev/null | |
# Run | |
echo "Updating NPM dependencies…" | |
npm ci &> /dev/null | |
echo "Building Gutenberg…" | |
npm run build &> /dev/null | |
# Measure | |
echo "Done." | |
echo "Collecting resource stats…:" | |
echo "-- at 0 seconds" | |
ps -ro comm,pcpu,time -p $(pgrep -f Docker.app) | |
sleep 30 | |
echo "-- at 30 seconds" | |
ps -ro comm,pcpu,time -p $(pgrep -f Docker.app) | |
sleep 30 | |
echo "-- at 60 seconds" | |
ps -ro comm,pcpu,time -p $(pgrep -f Docker.app) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment