github.com/vipernet-xyz/tm@v0.34.24/scripts/mockery_generate.sh (about)

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