Helen Hou-Sandi 5a87725ed9 Build/Test Tools: Improve devcontainer setup for non-Codespaces usage
This now runs in local Docker as well. Sets the executable propset to explicitly identify `install-tool.sh` and `setup.sh` as executable. Unclear if this will sync via the Git mirror; ideally it would as otherwise the two files show as modified in a Git clone even in a fresh container.

Props samruddhikhandale.
See #57187.


git-svn-id: https://develop.svn.wordpress.org/trunk@55353 602fd350-edb4-49c9-b593-d223f7449a82
2023-02-16 03:48:26 +00:00

19 lines
546 B
Bash
Executable File

#!/bin/sh
set -eux
if [ -z ${CODESPACE_NAME+x} ]; then
SITE_HOST="http://localhost:8080"
else
SITE_HOST="https://${CODESPACE_NAME}-8080.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN}"
fi
# Install dependencies
cd /workspaces/wordpress-develop
npm install && npm run build:dev
# Install WordPress and activate the plugin/theme.
cd /var/www/html
echo "Setting up WordPress at $SITE_HOST"
wp core install --url="$SITE_HOST" --title="WordPress Trunk" --admin_user="admin" --admin_email="admin@example.com" --admin_password="password" --skip-email