Last active
November 16, 2018 22:17
-
-
Save oskosk/0b7c45522c945a62309dd57103f94133 to your computer and use it in GitHub Desktop.
Script for downloading and building Gutenberg on a Jurassic Ninja site
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
#!/bin/sh | |
GUTENBERG_BRANCH=master | |
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash | |
export NVM_DIR="$HOME/.nvm" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion | |
nvm install 10 | |
echo "Getting Gutenberg master branch" | |
cd $HOME/apps/$USER/public/wp-content/plugins \ | |
&& git clone https://github.com/wordpress/gutenberg --depth=1 -b "$GUTENBERG_BRANCH" \ | |
&& cd gutenberg \ | |
&& echo "Building Gutenberg branch $GUTENBERG_BRANCH" \ | |
&& npm ci \ | |
&& npm run build \ | |
&& rm -rf node_modules \ | |
&& rm -rf $HOME/.npm \ | |
&& rm -rf $HOME/.nvm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment