Project Operations
Some commands are available that can operate from the root of the project folder. These can be useful for modifying source files for cross-platform apps or run other administrative tasks on the entire repo or monorepo.
copy
Copy files from the project to anywhere else in the project
project:
copy:
- src: file1.json
dest: file2.json
json
Modifies JSON files relative to the root of the project. Use set to override the element (and clobber any children), or merge to merge the values:
project:
json:
- file: google-services.json
set:
project_info:
project_id: "MY_ID"
- file: google-services.json
merge:
data:
field: "MY_FIELD"
xml
Modifies XML files relative to the root of the project. This operation supports the following XML file modifications:
attrsupdates the attributes of the giventargetnode.mergemerges the given XML tree supplied tomergewith the giventarget. Merge expects a matching root node to be supplied. The merge algorithm merges any nodes that match with at least all of the supplied node's attributes, or appends any new children not found in the target node.injectinjects the given XML tree supplied toinjectinside of the giventargetdeletedeletes nodes specified bydeletein XPath format.deleteAttributesdeletes the given attributes indeleteAttributesinside of the giventarget
project:
xml:
- file: file.xml
target: entries/field
merge: |
<field>
<string>Value</string>
</field>