Created
June 24, 2018 06:48
-
-
Save calcsam/4aa066a46d74b6713c053a6adc0e0f76 to your computer and use it in GitHub Desktop.
Build script used for Gatsby performance benchmarking
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
export GITHUB_USER=freeCodeCamp | |
export REPO=guide | |
export COMMIT_HASH=6f35bcd61103545136a3ed130124da9822b761ed | |
#export GITHUB_USER=calcsam | |
#export REPO=gatsby-image-performance-benchmarking | |
#export COMMIT_HASH=d2d358ed54ade68c057333666777fd56bef5ebf2 | |
#export COMMIT_HASH=f05103a1c3e0b25ea4beafd63b6df72953d657b2 | |
sudo -E su | |
yum install -y gcc-c++ make | |
curl -sL https://rpm.nodesource.com/setup_8.x | sudo -E bash - | |
yum install nodejs | |
curl -o $COMMIT_HASH https://codeload.github.com/$GITHUB_USER/$REPO/zip/$COMMIT_HASH | |
exit | |
unzip $COMMIT_HASH | |
cd $REPO-$COMMIT_HASH | |
npm install | |
./node_modules/.bin/gatsby build | |
./node_modules/.bin/gatsby build | |
rm -r .cache | |
rm -r public |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment