Skip to content

Commit

Permalink
Merge pull request #317 from Automattic/update-dev-tools
Browse files Browse the repository at this point in the history
fix(dev-env): use `.rsyncignore` to prevent `dev-env-plugin.php` from removal on sync
  • Loading branch information
sjinks authored Aug 12, 2024
2 parents 4554f1f + d107d4b commit bf6f87a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
3 changes: 3 additions & 0 deletions features/src/dev-tools/NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
The Dev Tools feature installs a "Development Environment" plugin into MU plugins of WordPress.

This plugin adds the functionality available in [VIP Local Development Environments](https://docs.wpvip.com/vip-local-development-environment/) into Development Containers/Codespaces.
3 changes: 2 additions & 1 deletion features/src/dev-tools/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"id": "dev-tools",
"name": "Dev Tools",
"version": "1.0.2",
"version": "1.0.3",
"description": "Installs Development tools into the Dev Environment",
"documentationURL": "https://github.com/Automattic/vip-codespaces/tree/trunk/features/src/dev-tools",
"installsAfter": [
"ghcr.io/automattic/vip-codespaces/vip-go-mu-plugins"
]
Expand Down
9 changes: 9 additions & 0 deletions features/src/dev-tools/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,13 @@ echo '(*) Installing Dev Tools...'
install -d -D -m 0755 -o "${_REMOTE_USER}" -g "${_REMOTE_USER}" /wp/wp-content/mu-plugins
install -m 0644 -o "${_REMOTE_USER}" -g "${_REMOTE_USER}" dev-env-plugin.php /wp/wp-content/mu-plugins/dev-env-plugin.php

install -d -m 0755 -o root -g root /etc/vip-go-mu-plugins
if [ -f /etc/vip-go-mu-plugins/.rsyncignore ]; then
touch /etc/vip-go-mu-plugins/.rsyncignore
fi

if ! grep -qF dev-env-plugin.php /etc/vip-go-mu-plugins/.rsyncignore; then
echo 'dev-env-plugin.php' >> /etc/vip-go-mu-plugins/.rsyncignore
fi

echo 'Done!'

0 comments on commit bf6f87a

Please sign in to comment.