go-toolbox/scripts/workers/mockery.sh

15 lines
504 B
Bash
Raw Normal View History

2024-05-04 13:18:37 +05:00
#!/bin/bash
mockery_v2_version=2.42.2
cd /tmp || exit 1
# mockery v2 we download from releases page
arch=$(uname -m)
download_url="https://github.com/vektra/mockery/releases/download/v${mockery_v2_version}/mockery_${mockery_v2_version}_Linux_${arch}.tar.gz"
curl -L ${download_url} -o "/tmp/mockery_${arch}.tar.gz"
mkdir /tmp/mockery_v2
tar xf "/tmp/mockery_${arch}.tar.gz" -C /tmp/mockery_v2
mv /tmp/mockery_v2/mockery /usr/local/bin/mockery_v2
rm -rf "/tmp/mockery_$(uname -m).tar.gz" /tmp/mockery*