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

buildozer: Add parameter to substitute commands to exclude certain expressions #799

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Yannic
Copy link
Contributor

@Yannic Yannic commented Mar 2, 2020

A common use-case for buildozer 'substitute ...' is to move everything
in a package to a different package (e.g. mapping packages from
//... to //third_party/project/... during Copybara import).
However, some packages have special meaning for Bazel and should
(usually) not be renamed.

This change adds an optional last parameter to substitute and
substitute_load that is used to exclude expressions if they match the
passed regexp.

…pressions

A common use-case for `buildozer 'substitute ...'` is to move everything
in a package to a different package (e.g. mapping packages from
`//...` to `//third_party/project/...` during Copybara import).
However, some packages have special meaning for Bazel and should
(usually) not be renamed.

This change adds an optional last parameter to `substitute` and
`substitute_load` that is used to exclude expressions if they match the
passed regexp.
@Yannic Yannic marked this pull request as ready for review March 2, 2020 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants