trapeze
trapeze copied to clipboard
Copy files
Hi!
Can I copy files with yaml?
For example, I want to copy google-services.json from root to android/app folder.
Thank you!
Not yet but it's definitely easily doable.
How would you imagine this working? Something like:
copy:
src: /absolute/path/to/file
dest: ./
One question this prompts: should the paths be relative to the android or iOS project or absolute, or both?
Not yet but it's definitely easily doable.
How would you imagine this working? Something like:
copy: src: /absolute/path/to/file dest: ./One question this prompts: should the paths be relative to the android or iOS project or absolute, or both?
Thanks for reply!
Yes, I think it would be cool :) The path could be from project root.
I also missed this feature earlier. At least for android res files, copying was already possible, but not for files in general.
So for android I sort of tricked the res operation in copying my google-services.json file by using the realtive path to go outside the res folder:

And for iOS I had to use the more complicated way of manipulating all the values without copying a seperate file:

I think a source parameter for a copy operation should work the same way it does for the res operation of the android platform.
@Crylion nice, appreciate the ingenuity ☺️ definitely something that can be easily added soon
Hi @mlynch !
Thanks for update, but it don't works for me. I updated this package and when i ran it, it said this: [warn] Unsupported configuration option android.copy. Skipping
I use these versions:


Could you help me, please? Thank you!
@mlynch @aktivdigital-frontend I can confirm that. While the version I built and tested for this PR worked fine, the released 5.0.2 does not seem to include the copy operation at all 🤔 Might something have go wrong with compilation, so that an old state was released on accident? The changes of https://github.com/ionic-team/trapeze/pull/97 did also not actually make it into the version 😅
Try 5.0.3. Used the old release process again that doesn't build in advance. Annoying, will probably need to move to doing the releases in github actions at some point
@mlynch It works! Thank you for this feature!