Automatically generate conversions

This commit is contained in:
Wojciech Tyczynski
2015-05-19 17:47:03 +02:00
parent d85dc7b2ea
commit 2df11cea32
4 changed files with 73 additions and 8 deletions

View File

@@ -251,12 +251,8 @@ Once all the necessary manually written conversions are added, you need to
regenerate auto-generated ones. To regenerate them:
- run
```
$ go run cmd/kube-conversion/conversion.go -v <version> -f <file1.txt> -n <file2.txt>
$ hack/update-generated-conversions.sh
```
- replace all conversion functions (convert\* functions) in the
`pkg/api/<version>/conversion_generated.go` with the contents of \<file1.txt\>
- replace arguments of `api.Scheme.AddGeneratedConversionFuncs` in the
`pkg/api/<version>/conversion_generated.go` with the contents of \<file2.txt\>
Unsurprisingly, adding manually written conversion also requires you to add tests to
`pkg/api/<version>/conversion_test.go`.