From 98132e60d91ac94dcbbaf90eabee6ada6b62a939 Mon Sep 17 00:00:00 2001 From: Lars Gersmann Date: Tue, 29 Oct 2024 15:24:44 +0100 Subject: [PATCH] fix: GH workflow --- .devcontainer/Dockerfile | 6 ++++-- .devcontainer/devcontainer.json | 26 -------------------------- .env | 5 ++++- 3 files changed, 8 insertions(+), 29 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 58b22fc..36dad13 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -29,7 +29,7 @@ EXPOSE 8889 EXPOSE 6006 # doesnt work anymore as of 2024-10-29 because of devcontainer.json spec changes -# +# # # enable persisted bash completion # # https://code.visualstudio.com/remote/advancedcontainers/persist-bash-history # RUN SNIPPET="export PROMPT_COMMAND='history -a' && export HISTFILE=/commandhistory/.bash_history" \ @@ -57,7 +57,9 @@ EOF USER $USERNAME -ENV WP_ENV_HOME=./wp-env-home +# when running in a container, the default WP_ENV_HOME should be used +ENV WP_ENV_HOME=~/.wp-env + ENV PNPM_VERSION=9.12.3 ENV PNPM_NODEJS_VERSION=20.17.0 ENV XDEBUG_MODE=off diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 64d476f..d51f276 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -26,32 +26,6 @@ // "source=projectname-bashhistory,target=/commandhistory,type=volume" // ], - // doesnt work anymore as of 2024-10-29 - // - // "customizations": { - // "vscode": { - // "extensions": [ - // "EditorConfig.EditorConfig", - // "dbaeumer.vscode-eslint", - // "esbenp.prettier-vscode", - // "stylelint.vscode-stylelint", - // "yogensia.searchwpdocs", - // "johnbillion.vscode-wordpress-hooks", - // "bmewburn.vscode-intelephense-client", - // "rexshi.phpdoc-comment-vscode-plugin", - // "VisualStudioExptTeam.vscodeintellicode", - // "johnbillion.vscode-wordpress-hooks", - // "pucelle.vscode-css-navigation", - // "xdebug.php-debug" - // ], - // // Set *default* container specific settings.json values on container create. - // "settings": { - // "terminal.integrated.shell.linux": "/bin/bash", - // "files.eol": "\n" - // } - // } - // }, - "portsAttributes": { "9003": { "label": "PHP xdebug port" diff --git a/.env b/.env index a197e7f..8c0c060 100644 --- a/.env +++ b/.env @@ -9,7 +9,10 @@ GIT_CLEAN_OPTS='-Xfd --interactive' # directory to store wp-env data -WP_ENV_HOME=./wp-env-home +# (only set when NOT running inside a dev container) +if [[ "$HOME" == "/home/vscode" ]]; then + WP_ENV_HOME=./wp-env-home +fi # start wp-env with xdebug enabled WP_ENV_START_OPTS='--debug --xdebug'