Skip to content

Commit

Permalink
Ignore the .ddev directory when checking for untracked files
Browse files Browse the repository at this point in the history
  • Loading branch information
justafish committed Aug 22, 2024
1 parent e6500fb commit 08693da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions scaffold/gitignore/ddev.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
########
.ddev/config.local.yaml
.ddev/commands/web/task
.ddev/.drianpipe-composer-cache
5 changes: 3 additions & 2 deletions tasks/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,9 @@ tasks:
desc: Checks for any untracked files in git
cmds:
- |
if [ "$(git status -s --ignore-submodules=dirty)" != "" ]; then
git status -s --ignore-submodules=dirty
# Ignore the .ddev folder as changes are made to this in order to run tests e.g. adding environment variables.
if [ "$(git status -s --ignore-submodules=dirty -- ':!.ddev')" != "" ]; then
git status -s --ignore-submodules=dirty -- ':!.ddev'
echo "Untracked changes detected - please rectify or add the files to your .gitignore"
exit 1
fi
Expand Down

0 comments on commit 08693da

Please sign in to comment.