summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorRichard Bradfield2020-03-07 12:28:55 +0000
committerRichard Bradfield2020-03-07 12:28:55 +0000
commit877e1cdacb2dc81784d46bafeb17d99801532f4a (patch)
tree89114ebf02d0a334f9fd0ef434558e2dc9459dbd /PKGBUILD
parent7b221c2f823e32d19bfc2a8e623642e6c27eb709 (diff)
downloadaur-877e1cdacb2dc81784d46bafeb17d99801532f4a.tar.gz
Bump version to 0.6.1
Also build and install shell completions where supported.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD14
1 files changed, 12 insertions, 2 deletions
diff --git a/PKGBUILD b/PKGBUILD
index e0dc75862055..1dacbf67a795 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Richard Bradfield <bradfier@fstab.me>
pkgname=github-cli
-pkgver=0.6.0
+pkgver=0.6.1
pkgrel=1
pkgdesc="The GitHub CLI"
arch=("x86_64")
@@ -11,13 +11,19 @@ depends=("glibc")
makedepends=("go")
optdepends=("git: To interact with repositories")
source=("$pkgname-$pkgver.tar.gz::https://github.com/cli/cli/archive/v${pkgver}.tar.gz")
-sha256sums=('1d298968f3e93ac5ffa5d36f003ce005f784f5a3fa66552bfd14fe88cfc68274')
+sha256sums=('237b18f9e3c82caa1cb06df3ca763ad7b32dab7e9a9a6f89afe7593bc31c3290')
build() {
cd "cli-$pkgver"
go build \
-trimpath \
-ldflags "-extldflags ${LDFLAGS} -X github.com/cli/cli/command.Version=v${pkgver} -X github.com/cli/cli/command.BuildDate=$(date +%Y-%m-%d)" -o "bin/gh" ./cmd/gh
+
+ # Build shell completion files
+ mkdir ./_completions
+ bin/gh completion -s bash > ./_completions/bash
+ bin/gh completion -s zsh > ./_completions/zsh
+ bin/gh completion -s fish > ./_completions/fish
}
package() {
@@ -25,4 +31,8 @@ package() {
install -Dm755 "bin/gh" "${pkgdir}/usr/bin/gh"
install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/github-cli"
install -Dm644 "README.md" "${pkgdir}/usr/share/doc/github-cli/README.md"
+
+ install -Dm644 "_completions/bash" "${pkgdir}/usr/share/bash-completion/completions/gh"
+ install -Dm644 "_completions/zsh" "${pkgdir}/usr/share/zsh/site-functions/_gh"
+ install -Dm644 "_completions/fish" "${pkgdir}/usr/share/fish/vendor_completions.d/gh.fish"
}