Leo 2928d0a6ad testing/*: rebuild against go1.17.1
These aports have been found to have Go binaries that use archive/zip,
which was recently updated to fix CVE-2021-39293
2021-09-14 01:07:01 +00:00

62 lines
1.6 KiB
Plaintext

# Contributor: Leo <thinkabit.ukim@gmail.com>
# Contributor Andrei Jiroh Eugenio Halili <ajhalili2006@gmail.com>
# Maintainer: Andrei Jiroh Eugenio Halili <ajhalili2006@gmail.com>
pkgname=github-cli
pkgver=2.0.0
pkgrel=1
pkgdesc="CLI for dealing with GitHub"
options="net chmod-clean" # Need to fetch modules and clean them up
url="https://cli.github.com"
arch="all"
license="MIT"
depends="git"
makedepends="go"
subpackages="
$pkgname-doc
$pkgname-bash-completion
$pkgname-zsh-completion
$pkgname-fish-completion
"
source="https://github.com/cli/cli/archive/v$pkgver/github-cli-$pkgver-$pkgver.tar.gz
"
builddir="$srcdir/cli-$pkgver"
prepare() {
default_prepare
# TODO: These tests invoke the TTY and our container *really* does not like that
# Copied from https://github.com/archlinux/svntogit-community/blob/packages/github-cli/trunk/PKGBUILD
rm pkg/cmd/auth/login/login_test.go
}
build() {
CGO_CPPFLAGS="$CPPFLAGS" \
CGO_CFLAGS="$CFLAGS" \
CGO_CXXFLAGS="$CXXFLAGS" \
CGO_LDFLAGS="$LDFLAGS" \
\
make GH_VERSION="v$pkgver" bin/gh manpages
bin/gh completion -s bash | install -Dm0644 /dev/stdin \
share/bash-completion/completions/gh
bin/gh completion -s zsh | install -Dm0644 /dev/stdin \
share/zsh/site-functions/_gh
bin/gh completion -s fish | install -Dm0644 /dev/stdin \
share/fish/completions/gh.fish
}
check() {
go test -v ./...
}
package() {
install -Dm755 bin/gh "$pkgdir"/usr/bin/gh
mkdir -p "$pkgdir"/usr
cp -r share "$pkgdir"/usr
}
sha512sums="
3b0008894690a9a097259410e144e0031dee7c876e0b862e5219009d82a2f50d00ad22e3d92a16c369e9b1f0f51668e868c08d9eeb718dfe8a0337aa00233435 github-cli-2.0.0-2.0.0.tar.gz
"