However although I find that the new modes deep_merge_append and deep_merge_prepend work. The deep_merge does not work. It does not overwrite the existing array.
I am attempting to replace the first script array with the second, but deep_merge keeps the script array from the first import.
will first merge your .travis.yml contents into LTS-active.yml (i.e. things in the .travis.yml file “win”, if the merge mode deep_merge would be used).
The result of that will then be merged into .other_travis_configs.yml (again, things in the result of the previous merge win over what’s in this one, as you specified deep_merge here).
The reasoning behind this is that in many cases, when you import something to your .travis.yml file, you want to be able to overwrite or customize that imported config with config in your .travis.yml file.
I believe you can achieve what you’re after by either moving
script:
- npm run lint
- npm run test
- npm run build
to your .travis.yml file, and specifying mode: deep_merge on the LTS-active.yml import (discarding your second import).
Or you could switch around the order of your two imports.
Is there any reason you want to keep the overwriting scripts in a second import?
Thank you @svenfuchs looking into this now as thanks giving is over in the US
My reading was exactly the opposite of what was happening. Just did a build and all
is good now that I understand the order of merging.