summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Lisin2022-04-14 08:55:52 +0200
committerMatthias Lisin2022-04-14 08:55:52 +0200
commita725b49c1354868963065365af697cf2400cdbbd (patch)
tree8a9e058fb19568040aa66a29f316f7f2a8733b27
parent3e79c8c311cd72fb76e76a020862f247b3601048 (diff)
downloadaur-a725b49c1354868963065365af697cf2400cdbbd.tar.gz
updpkg: golang-mockery 2.10.6-2
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD14
2 files changed, 12 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 18210c9b96a..ea9f02cb947 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = golang-mockery
pkgdesc = A mock code autogenerator for golang
pkgver = 2.10.6
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/vektra/mockery
arch = x86_64
license = BSD
diff --git a/PKGBUILD b/PKGBUILD
index 1740c0c3d7a..86fd29d6e9b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: ml <>
pkgname=golang-mockery
pkgver=2.10.6
-pkgrel=1
+pkgrel=2
pkgdesc='A mock code autogenerator for golang'
arch=('x86_64')
url='https://github.com/vektra/mockery'
@@ -20,10 +20,18 @@ build() {
export CGO_CXXFLAGS="$CXXFLAGS"
export GOFLAGS='-buildmode=pie -modcacherw -trimpath'
go build -o mockery -ldflags "-linkmode=external -X github.com/vektra/mockery/v2/pkg/config.SemVer=$pkgver" main.go
+
+ for i in bash zsh fish; do
+ # --config=/dev/null to avoid reading .mockery.yaml
+ ./mockery --config=/dev/null completion "$i" >completion."$i"
+ done
}
package() {
cd mockery-"$pkgver"
- install -Dm755 mockery -t "$pkgdir/usr/bin"
- install -Dm755 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
+ install -Dm755 mockery -t "$pkgdir"/usr/bin
+ install -Dm755 LICENSE -t "$pkgdir"/usr/share/licenses/"$pkgname"
+ install -Dm644 completion.bash "$pkgdir"/usr/share/bash-completion/completions/mockery
+ install -Dm644 completion.zsh "$pkgdir"/usr/share/zsh/site-functions/_mockery
+ install -Dm644 completion.fish "$pkgdir"/usr/share/fish/vendor_completions.d/mockery.fish
}