This repository has been archived by the owner on Sep 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add build-gutenpack.sh script in repo (#147)
* Add build-gutenpack sh script * Update npm ci command to npx lerna bootstrap --ci
- Loading branch information
Showing
3 changed files
with
57 additions
and
18 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/sh | ||
|
||
CALYPSO_BRANCH="${1:-master}" | ||
JETPACK_DIRNAME="${2:-jetpack}" | ||
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 wp-calypso branch $CALYPSO_BRANCH" | ||
cd $HOME \ | ||
&& git clone https://github.com/automattic/wp-calypso --depth=1 -b "$CALYPSO_BRANCH" \ | ||
&& cd wp-calypso \ | ||
&& npx lerna bootstrap --ci \ | ||
&& echo "Building jetpack-editor for wp-calypso branch $CALYPSO_BRANCH" \ | ||
&& npm run sdk -- gutenberg client/gutenberg/extensions/presets/jetpack \ | ||
--output-dir=$HOME/apps/$USER/public/wp-content/plugins/"$JETPACK_DIRNAME"/_inc/blocks \ | ||
&& echo -e "\nadd_filter( 'jetpack_gutenberg', '__return_true', 10 );\n" >> $HOME/apps/$USER/public/wp-content/plugins/companion/companion.php \ | ||
&& echo -e "add_filter( 'jetpack_gutenberg_cdn', '__return_false', 10 );\n" >> $HOME/apps/$USER/public/wp-content/plugins/companion/companion.php \ | ||
&& cd $HOME/apps/$USER/public \ | ||
&& rm -rf $HOME/wp-calypso \ | ||
&& rm -rf $HOME/.npm |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,42 @@ | ||
version: "3" | ||
services: | ||
db: | ||
container_name: jn_mysql | ||
image: mysql:5.7 | ||
environment: | ||
MYSQL_ROOT_PASSWORD: wordpress | ||
MYSQL_DATABASE: wordpress | ||
volumes: | ||
- ./jndb:/var/lib/mysql | ||
ports: | ||
- "${PORT_MYSQL:-3306}:3306" | ||
env_file: | ||
- ../jetpack/docker/default.env | ||
- ../jetpack/docker/.env | ||
|
||
wordpress: | ||
image: wordpress | ||
container_name: jn_wordpress | ||
depends_on: | ||
- db | ||
build: ../jetpack/docker | ||
image: jn_wordpress:localbuild | ||
ports: | ||
- 80:80 | ||
- "${PORT_WORDPRESS:-80}:80" | ||
env_file: | ||
- ../jetpack/docker/default.env | ||
- ../jetpack/docker/.env | ||
environment: | ||
WORDPRESS_DB_PASSWORD: wordpress | ||
XDEBUG_CONFIG: remote_host=10.0.1.19 | ||
- HOST_PORT=${PORT_WORDPRESS} | ||
- WORDPRESS_DB_PASSWORD=wordpress | ||
- XDEBUG_CONFIG=_host=10.0.1.19 | ||
volumes: | ||
- ../jetpack:/var/www/html/wp-content/plugins/jetpack | ||
- ../wordpress-develop:/tmp/wordpress-develop | ||
- ../jetpack/docker/wordpress:/var/www/html | ||
- ../jetpack/docker/logs/apache2:/var/log/apache2 | ||
- ../jetpack/docker/logs/php:/var/log/php | ||
- ../jetpack/docker/bin:/var/scripts | ||
- ../jetpack/docker/wordpress-develop:/tmp/wordpress-develop | ||
- ../errors:/var/www/html/wp-content/plugins/errors | ||
- ./:/var/www/html/wp-content/plugins/jurassic.ninja | ||
- ../jurassic.ninja-ext:/var/www/html/wp-content/plugins/jurassic.ninja-ext | ||
- ../jetpack-beta:/var/www/html/wp-content/plugins/jetpack-beta-master | ||
links: | ||
- wordpressdb | ||
- wordpressdb:mysql | ||
|
||
wordpressdb: | ||
image: mariadb:latest | ||
environment: | ||
MYSQL_ROOT_PASSWORD: wordpress | ||
MYSQL_DATABASE: wordpress | ||
volumes: | ||
- ./jndb:/var/lib/mysql | ||
|
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