Comments (4)
# copy.bara.sky
load("common", "my_dict", "my_transforms")
core.console.info("this is my dict -" + str(my_dict))
core.workflow(
...
transformations = my_transforms
...
)
# common.bara.sky
my_dict = {
"capybara": "copybara",
"original": "replacement"
}
def my_transforms():
return [
core.replace(
before = key,
after = my_dict[key],
paths = glob(["**"])
)
for key in my_dict
]
from copybara.
Yes, starlark has a load
statement to include other files. You will want to write a function that returns a list of transforms to be added to your transform list.
from copybara.
Thanks @hsudhof. Is there an example present somewhere? I am completely new to Copybara and an example would be a great help.
from copybara.
Thank you @hsudhof @jordanlin00 for the help.
from copybara.
Related Issues (20)
- Raising PR from one SoT repo to multiple destination repos HOT 1
- PR cannot be found when `--github-use-repo` is specified. HOT 2
- Is it safe to use experimental_custom_rev_id ? HOT 5
- maintain git history but remove commits in which no origin files are present HOT 1
- best way to handle gradually open-sourcing multiple parts of a repo? HOT 1
- Why 'user.name' and/or 'user.email' must be configured ? HOT 7
- Passing a Variable to copybara.sky in Dockerized Copybara HOT 2
- Initial import of existing repo and ITERATIVE mode usage question HOT 3
- Compiling Copybara through Bazel HOT 1
- Submodules appear as regular directories HOT 1
- Package for Homebrew
- Add version tags to the repo to signal packagers that the software is stable
- What is the difference between uberjar and ordinary build?
- Compile standalone binary
- lfs support for git.destination
- Unable to build hermetically / without local java HOT 3
- Build failed use docker build HOT 2
- ITERATIVE mode only copies merge commits HOT 1
- Unexpected message regarding a canonical reproducible form
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from copybara.