Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let projects specify a default mask file for themselves #45

Merged
merged 1 commit into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading