From c7e88c372f7f17e09bc1c8dc6b5e581bbae6540a Mon Sep 17 00:00:00 2001 From: FollieHiyuki <folliekazetani@protonmail.com> Date: Fri, 29 Jul 2022 00:08:09 +0700 Subject: [PATCH] community/yq: upgrade to 4.26.1 Some fixes: - Generate shell completions in build() - Run more tests - Remove -doc subpackage --- community/yq/APKBUILD | 46 ++++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/community/yq/APKBUILD b/community/yq/APKBUILD index a843efd0c03c..8459d5346cef 100644 --- a/community/yq/APKBUILD +++ b/community/yq/APKBUILD @@ -1,16 +1,15 @@ +# Contributor: Hoang Nguyen <folliekazetani@protonmail.com> # Contributor: Tuan Hoang <tmhoang@linux.ibm.com> # Maintainer: Tuan Hoang <tmhoang@linux.ibm.com> pkgname=yq -pkgver=4.25.1 -pkgrel=3 -pkgdesc="portable command-line YAML processor written in Go" +pkgver=4.26.1 +pkgrel=0 +pkgdesc="Portable command-line YAML processor written in Go" url="https://github.com/mikefarah/yq" arch="all" license="MIT" makedepends="go" -options="chmod-clean" subpackages=" - $pkgname-doc $pkgname-bash-completion $pkgname-zsh-completion $pkgname-fish-completion @@ -20,32 +19,39 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/mikefarah/yq/archive/v$pkgve export GOCACHE="$srcdir/go-cache" export GOTMPDIR="$srcdir" export GOMODCACHE="$srcdir/go" +export GOFLAGS="$GOFLAGS -modcacherw" build() { - go build -v + go build -v -o yq + + ./yq shell-completion bash > yq.bash + ./yq shell-completion zsh > yq.zsh + ./yq shell-completion fish > yq.fish } check() { - go test + go test ./... + + # Yanked from scripts/acceptance.sh + for test in acceptance_tests/*.sh; do + echo "--------------------------------------------------------------" + echo "$test" + echo "--------------------------------------------------------------" + sh "$test" + done } package() { install -Dm755 yq "$pkgdir"/usr/bin/yq - for file in LICENSE README.md; do - install -Dm644 $file "$pkgdir"/usr/share/doc/$pkgname/$file - done - mkdir -p "$pkgdir"/usr/share/bash-completion/completions \ - "$pkgdir"/usr/share/zsh/site-functions \ - "$pkgdir"/usr/share/fish/completions - "$pkgdir"/usr/bin/yq shell-completion bash \ - > "$pkgdir"/usr/share/bash-completion/completions/yq.bash - "$pkgdir"/usr/bin/yq shell-completion zsh \ - > "$pkgdir"/usr/share/zsh/site-functions/_yq - "$pkgdir"/usr/bin/yq shell-completion fish \ - > "$pkgdir"/usr/share/fish/completions/yq.fish + install -Dm644 yq.bash \ + "$pkgdir"/usr/share/bash-completion/completions/yq + install -Dm644 yq.zsh \ + "$pkgdir"/usr/share/zsh/site-functions/_yq + install -Dm644 yq.fish \ + "$pkgdir"/usr/share/fish/completions/yq.fish } sha512sums=" -f6c2536e28ce153cbdad271a8ebdc9851453f9c607879928a9f2eabefb3a6fd33ceeaae6a7b8146684ab0801305de5f25444059108b95b9d96f35fb3d92740c3 yq-4.25.1.tar.gz +afc79b753f23f450851bb8a2600db96b9d7a285dc834f69df844c54da7aba90e644b4a33ebd1a37ff8e607477bfe66837be56a3667fecfa8ca646266954bf9d1 yq-4.26.1.tar.gz " -- GitLab