fix: windows compatibility issues #129
Open
+169
−120
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This addresses some compatibility issues that developers might run into on Windows, either through refactoring or documentation. Notable changes include:
tmp
directory forrun.sh
commandsdocker compose
commands in shell scripts to avoid needing to change the container name when customizing the projectautocrlf
behaviorCloses #126
To Validate
macOS
For macOS, we want to make sure everything is still working as expected, so this looks like a lot of steps, but the checklist should be fairly quick to run through.
docker compose down
)npm ci
.env.example
to.env
(no need to change the default values)docker compose build
npm run lint
and confirm that the PHP/Twig linting scripts work as expected (should be no errors found)npm run php:run composer install
and confirm that it runs without errors or with any changes to the lock filenpm run php:run composer require wpackagist-plugin/advanced-custom-fields
and confirm that bothcomposer.json
andcomposer.lock
are updatednpm start
and confirm the local site is working as expectednpm run export-db
and confirm that the DB export creates a.sql.gz
file insql/exports
npm run backup-db
and confirm that the DB backup creates a.sql.gz
file insql/backups
sql
and runnpm run import-db
npm run map-vendor-files
and confirm that a top-levelvendors
file is created and populated with files from the container.vscode/settings.json
to match the example in theREADME
npm run lint
and confirm that it runs as expected (no errors assuming you fixed the ones you introduced for testing)Windows
On Windows, we want to validate that there aren't any compatibility issues with our development process, and we want to confirm that our documentation is accurate.
npm config set script-shell "C:\\Program Files\\git\\bin\\bash.exe"
, assuming you have git bash installed (you may need to change a path segment toProgram Files (x86)
if you're on a 32 bit system)npm ci
.env.example
to.env
(no need to change the default values)docker compose build
npm run lint
and confirm that the PHP/Twig linting scripts work as expected (should be no errors found)npm run php:run composer install
and confirm that it runs without errors or with any changes to the lock filenpm run php:run composer require wpackagist-plugin/advanced-custom-fields
and confirm that bothcomposer.json
andcomposer.lock
are updatednpm start
and confirm the local site is working as expectednpm run export-db
and confirm that the DB export creates a.sql.gz
file insql/exports
npm run backup-db
and confirm that the DB backup creates a.sql.gz
file insql/backups
sql
and runnpm run import-db