# Contributor: Leo # Contributor: Celeste # Contributor: dabao1955 # Contributor: Andrei Jiroh Eugenio Halili maintainer="Alex Ungur " pkgname=github-cli pkgver=2.102.0 pkgrel=0 pkgdesc="CLI for dealing with GitHub" options="net" # Need to fetch modules url="https://cli.github.com" arch="all" license="MIT" depends="git" makedepends="go" checkdepends="openssh-keygen openssh-client" subpackages=" $pkgname-doc $pkgname-bash-completion $pkgname-fish-completion $pkgname-zsh-completion " source="https://github.com/cli/cli/archive/v$pkgver/github-cli-$pkgver.tar.gz no-ignore-goflags.patch skip-flaky-test.patch " 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 completions } check() { export TZ=Europe/London # skip tests that fail in official CI export GITHUB_ACTIONS=true go test ./... } package() { install -Dm755 bin/gh "$pkgdir"/usr/bin/gh install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/"$pkgname" rm -fr share/zsh/vendor-completions mkdir -p "$pkgdir"/usr cp -r share "$pkgdir"/usr } sha512sums=" d3821de17759debac0672b5d65d2b061db7b7c5f9391685fbac0636f0ae05e6a28e160197316f40646c4c87ed34d4c0e3cb30b6d4bcd640abade6bf611be8de0 github-cli-2.102.0.tar.gz 57be81e57c0bb5c36e07b6ff2aab661f1a9cd0bbab3ef159c24d59098451858c44fce09d2f5eb86380044568a6acc46ed65b56a87f5a3dc4057d5579e8f420aa no-ignore-goflags.patch 21f0693d26b6e7c4aff5845441d96069941f23392f585b18dfec6aab058c72441a5766eedecfa327cc1c2658098538ece2d7efa74af4be1bb5d0f36c5847a127 skip-flaky-test.patch "