summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD16
1 files changed, 10 insertions, 6 deletions
diff --git a/PKGBUILD b/PKGBUILD
index d7cf8067f679..56af7e223978 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=azure-kubelogin
_pkgname=kubelogin
-pkgver=0.0.11
+pkgver=0.0.12
pkgrel=1
pkgdesc="A Kubernetes credential (exec) plugin implementing azure authentication"
arch=('x86_64')
@@ -13,24 +13,28 @@ makedepends=('go')
conflicts=('kubelogin')
source=("$pkgname-$pkgver.tar.gz::https://github.com/Azure/$_pkgname/archive/refs/tags/v$pkgver.tar.gz")
-sha256sums=('087d6828effb1e2e23015ef69e922c17920bf15e874e77916c28f63ba6db9c3e')
+sha256sums=('01b37d3e7a1e952fccae8fab0c55375550783ae5cadb9eefac40b661be17fbee')
build() {
cd "$_pkgname-$pkgver"
- make
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
+ go build -o build/kubelogin
}
check() {
cd "$_pkgname-$pkgver"
- make test
+ go test -coverprofile=coverage.txt -covermode=atomic ./...
}
package() {
cd "$_pkgname-$pkgver"
- binary_dir="bin/$(go env GOOS)_$(go env GOARCH)"
- install -Dm755 "$binary_dir/kubelogin" $pkgdir/usr/bin/kubelogin
+ install -Dm755 "build/kubelogin" $pkgdir/usr/bin/kubelogin
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}