koji: use typeinfo in CGImport metadata instead of the legacy format

From Koji Content Generator Metadata[1]:

"maven, win, or image: Legacy build type names which appear at this level
instead of inside typeinfo."

=> see, it's legacy

"typeinfo: A map whose entries are the names of the build types used for
this build, which are free form maps containing type-specific information
for this build."

=> struct{} is used for typeinfo.image because the docs says it should contain
"a free form map", null apparently isn't an option.

[1]: https://docs.pagure.org/koji/content_generator_metadata/

As suggested by the Brew maintainers Tomáš Kopeček and Lubomír Sedlář.
This commit is contained in:
Ondřej Budai 2020-10-22 09:24:00 +02:00 committed by Tom Gundersen
parent f28e860e69
commit 3480fe3093

View file

@ -23,8 +23,12 @@ type Koji struct {
transport http.RoundTripper
}
type TypeInfo struct {
Image struct{} `json:"image"`
}
type ImageBuildExtra struct {
Image interface{} `json:"image"` // No extra info tracked at build level.
TypeInfo TypeInfo `json:"typeinfo"`
}
type ImageBuild struct {