Skip to content

Commit 70342aa

Browse files
authored
Let projects specify a default mask file for themselves (#45)
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
1 parent 559092d commit 70342aa

3 files changed

Lines changed: 15 additions & 0 deletions

File tree

README.markdown

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ contains an 8.1M `docs` directory. We can ignore this directory by creating a
124124
docs
125125
```
126126

127+
If you do not provide a `.mask` file on the project consuming the dependency,
128+
vendorpull will look for a *default* mask file called `vendorpull.mask` at the
129+
top level of the project you are vendoring.
130+
127131
Patches
128132
-------
129133

pull

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,14 @@ vendor() {
5858
log "Masking $1: $path"
5959
rm -rf "$4/$1/${path:?}"
6060
done < "$VENDOR/$1.mask"
61+
elif [ -f "$4/$1/vendorpull.mask" ]
62+
then
63+
while read -r path
64+
do
65+
log "Masking $1: $path"
66+
rm -rf "$4/$1/${path:?}"
67+
done < "$4/$1/vendorpull.mask"
68+
rm -f "$4/$1/vendorpull.mask"
6169
fi
6270

6371
# Swap

vendorpull.mask

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
bootstrap
2+
.editorconfig
3+
README.markdown

0 commit comments

Comments
 (0)