-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
82 additions
and
391 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
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,11 @@ | ||
#!/usr/bin/env sh | ||
|
||
set -eux | ||
|
||
echo "Installing wp-cli..." | ||
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar | ||
sudo chmod +x wp-cli.phar | ||
sudo mv wp-cli.phar /usr/local/bin/wp | ||
|
||
# Copy the welcome message | ||
sudo cp .devcontainer/welcome-message.txt /usr/local/etc/vscode-dev-containers/first-run-notice.txt |
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 @@ | ||
#!/usr/bin/env 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 | ||
|
||
PLUGIN_DIR=/workspaces/openid-connect-generic | ||
|
||
# Install Composer dependencies. | ||
cd "${PLUGIN_DIR}" | ||
composer install | ||
|
||
# Install Composer dependencies. | ||
cd "${PLUGIN_DIR}" | ||
npm ci | ||
|
||
# Setup the WordPress environment. | ||
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="[email protected]" --admin_password="password" --skip-email |
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,6 @@ | ||
👋 Welcome to "OpenID Connect for WP Development" in Codespaces! | ||
|
||
🛠️ Your environment is fully setup with all the required software. | ||
|
||
🚀 To get started, wait for the "postCreateCommand" to finish setting things up, then open the portforwarded URL and append '/wp-admin'. | ||
|
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,32 @@ | ||
#!/usr/bin/env sh | ||
## Description: Run local development commands. | ||
## Usage: ./dev-cli [flags] [command] | ||
## Example: "./dev-cli phpcs" | ||
|
||
WORKSPACE_DIR=./ | ||
|
||
# Check for the devcontainer CLI. | ||
# TODO: Add a devcontainer CLI check and provide a docker compose fallback. | ||
|
||
case $1 in | ||
build) | ||
devcontainer --workspace-folder ${WORKSPACE_DIR} build "${@:2}" | ||
;; | ||
start) | ||
devcontainer --workspace-folder ${WORKSPACE_DIR} up "${@:2}" | ||
;; | ||
composer) | ||
devcontainer exec --workspace-folder ${WORKSPACE_DIR} composer "${@:2}" | ||
;; | ||
npm) | ||
devcontainer exec --workspace-folder ${WORKSPACE_DIR} npm "${@:2}" | ||
;; | ||
phpcs|phpcbf|phpstan|phpunit) | ||
devcontainer exec --workspace-folder ${WORKSPACE_DIR} composer "$@" | ||
;; | ||
"") | ||
echo "Usage: ./dev-cli [flags] [command]" | ||
;; | ||
*) | ||
;; | ||
esac |
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
This file was deleted.
Oops, something went wrong.
File renamed without changes.
Oops, something went wrong.