mirror of
				https://gitea.com/Lydanne/buildx.git
				synced 2025-11-01 00:23:56 +08:00 
			
		
		
		
	bake: merge attest entries
This ensures that `target.attest=["type=sbom,<value>"]` can be appropriately merged when `--sbom=true` or `--set target.attest=type=sbom`. To merge, we simply naively take the last valid value. Signed-off-by: Justin Chadwell <me@jedevc.com>
This commit is contained in:
		| @@ -25,7 +25,7 @@ func ParseAttests(in []string) ([]*controllerapi.Attest, error) { | ||||
| 	found := map[string]struct{}{} | ||||
| 	for _, in := range in { | ||||
| 		in := in | ||||
| 		attest, err := parseAttest(in) | ||||
| 		attest, err := ParseAttest(in) | ||||
| 		if err != nil { | ||||
| 			return nil, err | ||||
| 		} | ||||
| @@ -40,7 +40,7 @@ func ParseAttests(in []string) ([]*controllerapi.Attest, error) { | ||||
| 	return out, nil | ||||
| } | ||||
|  | ||||
| func parseAttest(in string) (*controllerapi.Attest, error) { | ||||
| func ParseAttest(in string) (*controllerapi.Attest, error) { | ||||
| 	if in == "" { | ||||
| 		return nil, nil | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Justin Chadwell
					Justin Chadwell