Closed raphink closed 4 years ago
Hmm, if I'm remembering it correctly, using globs made it difficult to also purge matching files inside sub-directories.
purge_whitelist: [ '.resource_types/*.pp' ]
Would not delete
└── foo
└── bar.pp
But I could be wrong.
I'll have to test this again, your glob solution would make more sense to be honest.
I don't see why this would happen with my implementation.
At the moment, it's not possible to avoid purging .resource_types
content.
Also, r10k supports globs so it would make sense for g10k to behave the same way.
@xorpaul Anything I can do to help decide on whether to merge this?
I needed to adjust the tests to verify if the glob pattern really work.
I've also added github.com/yargevad/filepathx to support the recursive double star pattern.
---
deploy:
purge_levels: ['deployment', 'puppetfile', 'environment']
purge_whitelist: [ '.latest_revision', '.resource_types', 'resource_types/*.pp', '**/*.pp'. ]
deployment_purge_whitelist: [ 'example_hiera_*', '.resource_types' ]
sources:
example:
remote: 'https://github.com/xorpaul/g10k-environment.git'
basedir: '/tmp/out/'
prefix: true
example_hiera:
remote: 'https://github.com/xorpaul/g10k-hiera.git'
basedir: '/tmp/out/'
prefix: true
Check out the new release: https://github.com/xorpaul/g10k/releases/tag/v0.8.12
For example,
.resource_types
content is purged without this (the directory is ignored, but every file in it is purged).