diff options
author | Tom Whitwell | 2020-02-13 20:03:55 +0000 |
---|---|---|
committer | Tom Whitwell | 2020-02-13 20:59:20 +0000 |
commit | 0ea682ef91329daf44c2d8efcb7b12aa9606ba61 (patch) | |
tree | 048222a15025552dec35b6ba738002449af8f079 | |
parent | ed612ae84b7d73321effd63ae9de4937298cc47f (diff) | |
download | aur-0ea682ef91329daf44c2d8efcb7b12aa9606ba61.tar.gz |
Generate and install completions
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | Makefile | 7 | ||||
-rw-r--r-- | PKGBUILD | 47 | ||||
-rw-r--r-- | release-pipeline.yml | 1 |
4 files changed, 43 insertions, 14 deletions
@@ -1,7 +1,7 @@ pkgbase = gds-cli-git pkgdesc = CLI for GDS Staff pkgver = 535.f8b405e - pkgrel = 1 + pkgrel = 2 url = https://github.com/alphagov/gds-cli arch = i686 arch = x86_64 @@ -1,4 +1,4 @@ -.PHONY: PKGBUILD +.PHONY: PKGBUILD clean all: PKGBUILD .SRCINFO @@ -6,4 +6,7 @@ PKGBUILD: makepkg -doc .SRCINFO: PKGBUILD - makepkg --printsrcinfo > .SRCINFO
\ No newline at end of file + makepkg --printsrcinfo > .SRCINFO + +clean: + rm -rf gds-cli-git pkg src
\ No newline at end of file @@ -1,7 +1,7 @@ # Maintainer: Tom Whitwell <tom.whitwell@digital.cabinet-office.gov.uk> pkgname=gds-cli-git pkgver=535.f8b405e -pkgrel=1 +pkgrel=2 pkgdesc="CLI for GDS Staff" arch=('i686' 'x86_64') url="https://github.com/alphagov/gds-cli" @@ -16,23 +16,48 @@ source=("${pkgname}"::"git+https://github.com/alphagov/gds-cli") sha512sums=('SKIP') pkgver() { - cd "${srcdir}/${pkgname}" - echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD) + pushd "${srcdir}/${pkgname}" >/dev/null + { + echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD) + } + popd >/dev/null } build() { - cd "${srcdir}/${pkgname}" - rm -rf gds - make gds + msg2 'building gds' + pushd "${srcdir}/${pkgname}" >/dev/null + { + rm -rf gds + make gds + } + popd >/dev/null } check() { - ${srcdir}/${pkgname}/gds --version + msg2 'gds binary' + pushd ${srcdir}/${pkgname} >/dev/null + { + ./gds --version + } + popd >/dev/null } package() { - mkdir -p "${pkgdir}/usr/bin" - make -C "${srcdir}/${pkgname}" INSTALL_PATH="${pkgdir}/usr/bin" install - cd "${pkgdir}/usr/bin" - ln -s gds gds-cli + msg2 'gds binary' + pushd "${srcdir}/${pkgname}" >/dev/null + { + install -Dm755 "gds" "${pkgdir}/usr/bin/gds" + } + popd >/dev/null + + msg2 'completion files' + pushd "${srcdir}/${pkgname}" >/dev/null + { + mkdir completion + ./gds zsh-completion >completion/_gds + install -Dm644 "completion/_gds" "${pkgdir}/usr/share/zsh/site-functions/_gds" + ./gds bash-completion >completion/gds + install -Dm644 "completion/gds" "${pkgdir}/usr/share/bash-completion/completions/gds" + } + popd >/dev/null } diff --git a/release-pipeline.yml b/release-pipeline.yml index 2b459c4d6ec4..bf73508a550f 100644 --- a/release-pipeline.yml +++ b/release-pipeline.yml @@ -35,6 +35,7 @@ jobs: sudo chown -R notroot.notroot . git clone gds-cli-aur gds-cli-aur_updated cd gds-cli-aur_updated + sed -i 's/pkgrel\=.*$/pkgrel\=1/' PKGBUILD set +x git config --global credential.helper store git config --global push.default simple |