Allow default hash tags to be supplied in file areas

* Supply array or comma separated list of strings via 'hashTags' property
* oputil will use these unless --tags are supplied
* Uploads will default to these tags (but user can override)
This commit is contained in:
Bryan Ashby 2020-12-12 12:35:01 -07:00
parent 47a690c2fe
commit ceeda8b13f
No known key found for this signature in database
GPG key ID: B49EB437951D2542
5 changed files with 95 additions and 80 deletions

View file

@ -153,6 +153,8 @@ function scanFileAreaForChanges(areaInfo, options, cb) {
function updateTags(fe) {
if(Array.isArray(options.tags)) {
fe.hashTags = new Set(options.tags);
} else if (areaInfo.hashTags) { // no explicit tags; merge in defaults, if any
fe.hashTags = areaInfo.hashTags;
}
}
@ -227,7 +229,8 @@ function scanFileAreaForChanges(areaInfo, options, cb) {
fullPath,
{
areaTag : areaInfo.areaTag,
storageTag : storageLoc.storageTag
storageTag : storageLoc.storageTag,
hashTags : areaInfo.hashTags,
},
(stepInfo, next) => {
if(argv.verbose) {