From d3ece4948f007bfac3ed8445025ef21e3407468c Mon Sep 17 00:00:00 2001
From: FollieHiyuki <folliekazetani@protonmail.com>
Date: Tue, 7 Jun 2022 20:25:25 +0700
Subject: [PATCH] testing/stern: new aport

---
 testing/stern/APKBUILD | 47 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)
 create mode 100644 testing/stern/APKBUILD

diff --git a/testing/stern/APKBUILD b/testing/stern/APKBUILD
new file mode 100644
index 000000000000..05807c050f0b
--- /dev/null
+++ b/testing/stern/APKBUILD
@@ -0,0 +1,47 @@
+# Contributor: Hoang Nguyen <folliekazetani@protonmail.com>
+# Maintainer: Hoang Nguyen <folliekazetani@protonmail.com>
+pkgname=stern
+pkgver=1.21.0
+pkgrel=0
+pkgdesc="Multi pod and container log tailing for Kubernetes"
+url="https://github.com/stern/stern"
+arch="all"
+license="Apache-2.0"
+makedepends="go"
+subpackages="
+	$pkgname-bash-completion
+	$pkgname-zsh-completion
+	$pkgname-fish-completion
+	"
+source="$pkgname-$pkgver.tar.gz::https://github.com/stern/stern/archive/refs/tags/v$pkgver.tar.gz"
+
+build() {
+	GOLDFLAGS="
+	-X github.com/stern/stern/cmd.version=$pkgver
+	-X github.com/stern/stern/cmd.commit=AlpineLinux
+	-X github.com/stern/stern/cmd.date=$(date +%FT%T%Z)
+	"
+	go build -v -o bin/$pkgname -ldflags "$GOLDFLAGS"
+	./bin/stern --completion bash > stern.bash
+	./bin/stern --completion zsh > stern.zsh
+	./bin/stern --completion fish > stern.fish
+}
+
+check() {
+	go test ./...
+}
+
+package() {
+	install -Dm755 bin/$pkgname "$pkgdir"/usr/bin/$pkgname
+
+	install -Dm644 stern.bash \
+		"$pkgdir"/usr/share/bash-completion/completions/stern
+	install -Dm644 stern.zsh \
+		"$pkgdir"/usr/share/zsh/site-functions/_stern
+	install -Dm644 stern.fish \
+		"$pkgdir"/usr/share/fish/completions/stern.fish
+}
+
+sha512sums="
+e1e0b73cbddd6dd7729444f2ef9aa787a64f7ba70e951c39012e9d5faef6834363049f02f03163d48e94908ef238394878178b5a6dbcc22fa6a8d349049c9467  stern-1.21.0.tar.gz
+"
-- 
GitLab