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:
attrs
updates the attributes of the giventarget
node.merge
merges the given XML tree supplied tomerge
with 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.inject
injects the given XML tree supplied toinject
inside of the giventarget
delete
deletes nodes specified bydelete
in XPath format.deleteAttributes
deletes the given attributes indeleteAttributes
inside of the giventarget
project:
xml:
- file: file.xml
target: entries/field
merge: |
<field>
<string>Value</string>
</field>