Skip to content

Commit

Permalink
Let projects specify a default mask file for themselves
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Cruz Viotti <[email protected]>
  • Loading branch information
jviotti committed Jan 22, 2024
1 parent 6c39848 commit eb18999
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ contains an 8.1M `docs` directory. We can ignore this directory by creating a
docs
```

If you do not provide a `.mask` file on the project consuming the dependency,
vendorpull will look for a *default* mask file called `vendorpull.mask` at the
top level of the project you are vendoring.

Patches
-------

Expand Down
8 changes: 8 additions & 0 deletions pull
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ vendor() {
log "Masking $1: $path"
rm -rf "$4/$1/${path:?}"
done < "$VENDOR/$1.mask"
elif [ -f "$4/$1/vendorpull.mask" ]
then
while read -r path
do
log "Masking $1: $path"
rm -rf "$4/$1/${path:?}"
done < "$4/$1/vendorpull.mask"
rm -f "$4/$1/vendorpull.mask"
fi

# Swap
Expand Down
3 changes: 3 additions & 0 deletions vendorpull.mask
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
bootstrap
.editorconfig
README.markdown

0 comments on commit eb18999

Please sign in to comment.