mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 05:40:11 +01:00
If we do directory distributions write directory_urls
This commit is contained in:
parent
dce3d1f4a7
commit
8e13d37756
1 changed files with 13 additions and 0 deletions
|
|
@ -131,6 +131,19 @@ func (w *worker) writeProviderMetadata() error {
|
|||
w.processor.cfg.Domain+"/.well-known/csaf-aggregator/"+w.provider.Name,
|
||||
w.labelsFromSummaries())
|
||||
|
||||
// Fill in directory URLs if needed.
|
||||
if w.provider.writeIndices(w.processor.cfg) {
|
||||
labels := make([]string, 0, len(w.summaries))
|
||||
for label := range w.summaries {
|
||||
labels = append(labels, label)
|
||||
}
|
||||
sort.Strings(labels)
|
||||
prefix := w.processor.cfg.Domain + "/.well-known/csaf-aggregator/" + w.provider.Name + "/"
|
||||
for _, label := range labels {
|
||||
pm.AddDirectoryDistribution(prefix + label)
|
||||
}
|
||||
}
|
||||
|
||||
// Figure out the role
|
||||
var role csaf.MetadataRole
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue