Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TECH-33 Copy phpcs.xml to different path depending on host #211

Merged
merged 6 commits into from
Feb 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ jobs:
name: Run Behat tests
command: |
nohup php -S example.ddev.site:8000 -t $(pwd)/${DRUPAL_ROOT}/ > /tmp/artifacts/phpd.log 2>&1 &
google-chrome --headless --remote-debugging-port=9222 &>/dev/null &
vendor/bin/phing test -Dbuild.env=circleci
working_directory: ~/example

Expand Down
1 change: 1 addition & 0 deletions defaults/install/.circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ jobs:
name: Run Behat tests
command: |
nohup php -S ${CIRCLE_PROJECT_REPONAME}.local:8000 -t $(pwd)/${DRUPAL_ROOT}/ > /tmp/artifacts/phpd.log 2>&1 &
google-chrome --headless --remote-debugging-port=9222 &>/dev/null &
vendor/bin/phing test

- store_artifacts:
Expand Down
4 changes: 2 additions & 2 deletions defaults/install/phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
<rule ref="DrupalPractice"/>

<!-- Directories to scan. -->
<file>docroot/modules/custom</file>
<file>docroot/themes/custom</file>
<file>@webroot@/modules/custom</file>
<file>@webroot@/themes/custom</file>

<exclude-pattern>*/behat</exclude-pattern>
<exclude-pattern>*/node_modules</exclude-pattern>
Expand Down
12 changes: 11 additions & 1 deletion targets/install.xml
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,22 @@
</copy>

<!-- Copy the phpcs.xml file template.
This doesn't do any property substitution except for the "projectname".
-->
<echo>Updating pcpcs.xml file for project root.</echo>
<if>
<equals arg1="${build.host}" arg2="acquia"/>
<then>
<property name="phpcs_dir" value="docroot"/>
</then>
<else>
<property name="phpcs_dir" value="web"/>
</else>
</if>
<copy file="${phing.dir.install}/../defaults/install/phpcs.xml" tofile="${application.startdir}/phpcs.xml" overwrite="true">
<filterchain>
<replacetokens>
<token key="projectname" value="${projectname}" />
<token key="webroot" value="${phpcs_dir}" />
</replacetokens>
</filterchain>
</copy>
Expand Down