Skip to content

Latest commit

 

History

History
75 lines (52 loc) · 1.87 KB

installation.md

File metadata and controls

75 lines (52 loc) · 1.87 KB

Getting Started

Installation

GitHub Release

recommended

Visit the releases page to download one of the pre-built binaries for your platform.

go install

Supported, but not recommended: see wiki page and related discussions.

!!! warning

Do _not_ use `@latest` as this will pull from the latest, potentially untagged, commit on master.

Docker

Use the Docker image

docker pull vektra/mockery

Generate all the mocks for your project:

docker run -v "$PWD":/src -w /src vektra/mockery --all

Homebrew

Install through brew

brew install mockery
brew upgrade mockery
<script type="text/javascript"> function insert_installation_command(element_to_override,version){ element_to_override.innerHTML=` ``` go install github.com/vektra/mockery/v2@${version} ``` `; } const version_key="/mockery/version"; const element = document.getElementById('mockery-install-go-command'); const url = `https://api.github.com/repos/vektra/mockery/releases/latest`; let version = sessionStorage.getItem(version_key); if (version !== null) { insert_installation_command(element,version); } else { const request = new Request(url, { method: "GET", }); fetch(request) .then((response) => response.json()) .then((data) => { sessionStorage.setItem(version_key, data.name); insert_installation_command(element,data.name); }) .catch((error) =>{ console.error(error); element.innerHTML=`failed to fetch latest release info from: https://api.github.com/repos/vektra/mockery/releases/latest`; } ); } </script>