# Contributor: Kevin Daudt <kdaudt@alpinelinux.org>
# Maintainer: Kevin Daudt <kdaudt@alpinelinux.org>
pkgname=gotestfmt
pkgver=2.5.0
pkgrel=5
pkgdesc="tool to format output of go test"
url="https://github.com/GoTestTools/gotestfmt"
arch="all"
license="Unlicense"
makedepends="go"
options="net"
source="$pkgname-$pkgver.tar.gz::https://github.com/GoTestTools/gotestfmt/archive/v$pkgver/gotestfmt-$pkgver.tar.gz"

build() {
	go build \
		-ldflags="-buildid=" \
		-trimpath \
		-o gotestfmt ./cmd/gotestfmt
}

check() {
	go test -json -v ./... | tee test.log | ./gotestfmt -showteststatus -hide empty-packages
}

package() {
	install -Dm0755 gotestfmt "$pkgdir"/usr/bin/gotestfmt
}

sha512sums="
bfa0094a7b08406321b74dfc15b919e84a1bcc39c1ae87bb9f17f6442ae6d91b990130928d1ecbf814323bd41691cca81fece2b70fbe303929d7b67f2999bcab  gotestfmt-2.5.0.tar.gz
"
