Add new "archNamespace" template function for parsing "--arch-namespace" parameters
Example usage: `{{ archNamespace "windows-amd64" }}` => `winamd64`
This is intended for use in https://github.com/docker-library/docs to help create a list of "Supported architectures" for each image which links to each supported architecture repository (and if supported by Bashbrew itself, allows us to keep https://github.com/docker-library/docs isolated from Jenkins assumptions while still allowing Jenkins to contain the single-source-of-truth for arch-to-namespace mappings).
This commit is contained in:
parent
50e9eb1ddd
commit
ec5b4e484e
|
|
@ -45,6 +45,9 @@ func cmdCat(c *cli.Context) error {
|
|||
"arch": func() string {
|
||||
return arch
|
||||
},
|
||||
"archNamespace": func(arch string) string {
|
||||
return archNamespaces[arch]
|
||||
},
|
||||
}).Parse(format)
|
||||
if err != nil {
|
||||
return cli.NewMultiError(tmplMultiErr, err)
|
||||
|
|
|
|||
Loading…
Reference in New Issue