# Template file for 'stern'
pkgname=stern
version=1.34.0
revision=2
build_style=go
go_import_path="github.com/stern/stern"
go_ldflags="-X github.com/stern/stern/cmd.version=${version}
 -X github.com/stern/stern/cmd.date=$(date --date @$SOURCE_DATE_EPOCH +%Y-%m-%dT%H:%M:%SZ)
 -linkmode=external
 -compressdwarf=false"
short_desc="Multi pod and container log tailing for Kubernetes"
maintainer="Orphaned <orphan@voidlinux.org>"
license="Apache-2.0"
homepage="https://github.com/stern/stern"
distfiles="https://github.com/stern/stern/archive/v${version}.tar.gz"
checksum=1cfec22cef9705e68fc46060ba85164af12bd07ede9264bafb67d11400996e71

make_check_args="-skip=TestSternCommand"

post_build() {
	for shell in bash fish zsh; do
		CGO_ENABLED=0 GOARCH="" go run main.go --completion "$shell" \
			>"completion.$shell"
	done
}

post_install() {
	for shell in bash fish zsh; do
		vcompletion "completion.$shell" "$shell"
	done
}
