This fix tries to address the issue raised by #33856 where `make test-unit` will result in the failure: ``` ... ... dockerversion/useragent.go:20: undefined: Version dockerversion/useragent.go:22: undefined: GitCommit ok github.com/docker/docker/api 0.026s coverage: 68.0% of statements ok github.com/docker/docker/api/errors 0.003s coverage: 100.0% of statements FAIL github.com/docker/docker/api/server [build failed] make: *** [test-unit] Error 2 ``` The issue is because in case of `make test-unit`, `source "${MAKEDIR}/.go-autogen"` is missing. This caused the `make test-unit` failure. This fix adds `source "${MAKEDIR}/.go-autogen"` in `hack/make/test-unit` This fix fixes #33856. Signed-off-by: Yong Tang <yong.tang.github@outlook.com> Upstream-commit: fac486d0a02d6af2759f6d0e81bd8a23d82d432c Component: engine
This directory holds scripts called by make.sh in the parent directory.
Each script is named after the bundle it creates. They should not be called directly - instead, pass it as argument to make.sh, for example:
./hack/make.sh test
./hack/make.sh binary ubuntu
# Or to run all bundles:
./hack/make.sh
To add a bundle:
- Create a shell-compatible file here
- Add it to $DEFAULT_BUNDLES in make.sh