Closed philosopherdog closed 5 years ago
What you could do is the following to include / replace assets in your project:
Create (for instance) a PDF asset and place it in a folder:
MyApp/Resources/Assets.xcassets/MyImage.imageset/MyImage.pdf
And make (for instance) environment specific instances in:
Environments/Staging/MyImage.pdf
Environments/Production/MyImage.pdf
Then use the files
settings in your .natrium.yml
:
files:
"MyApp/Resources/Assets.xcassets/MyImage.imageset/MyImage.pdf":
Staging: "Environments/Staging/MyImage.pdf"
Production: "Environments/Production/MyImage.pdf"
That way Environments/Staging/MyImage.pdf
will be copied (and replace) MyApp/Resources/Assets.xcassets/MyImage.imageset/MyImage.pdf
in the pre-build step for your Staging environment
Excluding files is not possible at this time
This is a very good suggestion. In my case I have xcassets that contain duplicate file names. So, I have Base.xcassets twice in my project with the same file names for different assets. Is it possible to just add a dummy xcassets folder and copy the correct one over at run time. I'm thinking that might be a way to handle this. Is it possible to copy over the contents of xcassets instead of just a single file?
Yes you can also use a directory in the files
parameters.
That way a complete directory will be copied (and overwritten)
Is it possible to configure the inclusion and exclusion of different xcassets depending on environment or configuration?