Files
tendermint/scripts/mockery_generate.sh
M. J. Fromberger 48ec78e672 Update how Mockery mocks are checked for currency. (#8697)
The use of "go install" is deprecated as a way of installing and running the
Mockery binary. Update the runner script to depend on an ambient version of the
tool and ensure that in CI it's installed.
2022-06-03 15:02:04 -07:00

16 lines
468 B
Bash
Executable File

#!/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 "$@"