fix mockery generation script (#9094) (#9114)

This commit is contained in:
Callum Waters
2022-07-30 16:31:04 +02:00
committed by GitHub
parent 46badfabd9
commit 0846f3e4c7
27 changed files with 81 additions and 50 deletions

15
scripts/mockery_generate.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/sh
#
# Invoke Mockery v2 to update generated mocks for the given type.
#
# This script runs a locally-installed "mockery" if available, otherwise it
# runs the published Docker container. This legerdemain is so that the CI build
# and a local build can work off the same script.
#
if ! which mockery ; then
mockery() {
docker run --rm -v "$PWD":/w --workdir=/w vektra/mockery:v2.12.3
}
fi
mockery --disable-version-string --case underscore --name "$@"