summaryrefslogtreecommitdiff
path: root/testing/kube-no-trouble/APKBUILD
blob: 0e918b9bd51e32b251fa1b06c732860a79473be1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Contributor: Thomas Deutsch <thomas@tuxpeople.org>
# Maintainer: Thomas Deutsch <thomas@tuxpeople.org>
pkgname=kube-no-trouble
_pkgname=github.com/doitintl/kube-no-trouble
pkgver=0.7.3
pkgrel=0
pkgdesc="Easily check your clusters for use of deprecated APIs"
url="https://github.com/doitintl/kube-no-trouble"
arch="all"
license="MIT"
makedepends="go"
source="$pkgname-$pkgver.tar.gz::https://github.com/doitintl/kube-no-trouble/archive/refs/tags/$pkgver.tar.gz"
options="net"

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	local ldflags="
	-X main.version=$pkgver
	-X $_pkgname/cmd.version=$pkgver
	-X $_pkgname/cmd.commit=AlpineLinux
	-X $_pkgname/cmd.date=$(date -u +%FT%T%Z ${SOURCE_DATE_EPOCH:+-d @$SOURCE_DATE_EPOCH})
	"
	go build -ldflags "$ldflags" -o execs/$pkgname cmd/kubent/main.go
}

check() {
	go test ./...
}

package() {
	install -Dm755 execs/$pkgname "$pkgdir"/usr/bin/$pkgname
}

sha512sums="
64f87733f8e5c50219a58b57aa13cbb87daa4a00a0743d303f08db1f7e1301abf50880fb13eae152627ac487efbfe712756f8260d372677714db15696c8bbcef  kube-no-trouble-0.7.3.tar.gz
"