`githubRelease.unpackArchive.path` should support globbing
Describe the problem/challenge you have
Assets in Github releases often include the release version as part of the asset's filename, but vendir's unpackArchive option does not currently support globbing, although the githubRelease.assetNames array does support globbing. Lack of globbing support means that unpackArchive cannot be used as intended for many Github Releases.
Currently, attempting to pass a glob results in a cryptic "Expected known archive type (zip, tgz, tar)" error message.
For example,
this works, but you have to know the filename in advance:
- path: prometheus
githubRelease:
slug: prometheus/prometheus
latest: true
disableAutoChecksumValidation: true
assetNames: ["prometheus-*.linux-amd64.tar.gz"]
unpackArchive:
path: 'prometheus-2.25.0.linux-amd64.tar.gz'
this fails:
- path: prometheus
githubRelease:
slug: prometheus/prometheus
latest: true
disableAutoChecksumValidation: true
assetNames: ["prometheus-*.linux-amd64.tar.gz"]
unpackArchive:
path: 'prometheus-*.linux-amd64.tar.gz'
“Error: Syncing directory ‘config/upstream’: Syncing directory ‘prometheus’ with github release contents: Expected known archive type (zip, tgz, tar)”
Describe the solution you'd like Globbing should be supported. If the user-provided glob matches multiple files, an error message would be acceptable, as would be unpacking all of the specified archives.
good point!
Thanks for submitting this. We may not get to this soon but would accept contributions :)