fix: windows compatibility issues #129
Open
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:
tmpdirectory forrun.shcommandsdocker composecommands in shell scripts to avoid needing to change the container name when customizing the projectautocrlfbehaviorCloses #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.exampleto.env(no need to change the default values)docker compose buildnpm run lintand confirm that the PHP/Twig linting scripts work as expected (should be no errors found)npm run php:run composer installand confirm that it runs without errors or with any changes to the lock filenpm run php:run composer require wpackagist-plugin/advanced-custom-fieldsand confirm that bothcomposer.jsonandcomposer.lockare updatednpm startand confirm the local site is working as expectednpm run export-dband confirm that the DB export creates a.sql.gzfile insql/exportsnpm run backup-dband confirm that the DB backup creates a.sql.gzfile insql/backupssqland runnpm run import-dbnpm run map-vendor-filesand confirm that a top-levelvendorsfile is created and populated with files from the container.vscode/settings.jsonto match the example in theREADMEnpm run lintand 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.exampleto.env(no need to change the default values)docker compose buildnpm run lintand confirm that the PHP/Twig linting scripts work as expected (should be no errors found)npm run php:run composer installand confirm that it runs without errors or with any changes to the lock filenpm run php:run composer require wpackagist-plugin/advanced-custom-fieldsand confirm that bothcomposer.jsonandcomposer.lockare updatednpm startand confirm the local site is working as expectednpm run export-dband confirm that the DB export creates a.sql.gzfile insql/exportsnpm run backup-dband confirm that the DB backup creates a.sql.gzfile insql/backupssqland runnpm run import-db