diff options
author | ObserverOfTime | 2021-01-17 15:58:25 +0200 |
---|---|---|
committer | ObserverOfTime | 2021-01-17 15:58:25 +0200 |
commit | 29d7c90f6bbacd8d5195f1a907b476f6d27d2b45 (patch) | |
tree | 2a3a9a417499820a50e759ff7f3fe63b69e2a062 /PKGBUILD | |
parent | 23e1a3c278350555b9ecc88bf086ded1aa5fb919 (diff) | |
download | aur-yarn-completion-git.tar.gz |
Fix pkgver & move patch to a file
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 54 |
1 files changed, 6 insertions, 48 deletions
@@ -1,68 +1,26 @@ # Maintainer: ObserverOfTime <chronobserver@disroot.org> pkgname=yarn-completion-git -pkgver=v0.17.0.r0.g30262cf -pkgrel=4 +pkgver=0.17.0.r0.g30262cf +pkgrel=5 pkgdesc='Bash completion for Yarn' url='https://github.com/dsifford/yarn-completion' arch=('any') license=('MIT') depends=('bash' 'bash-completion' 'yarn') makedepends=('git') -source=("git+${url}.git") -md5sums=('SKIP') +source=("git+${url}.git" '0001-fix-tests.patch') +sha256sums=('SKIP' 'e00774fa650fb037ae62e0963308baee7509a4bbeea445193684db2c2e8a18d2') pkgver() { cd ${pkgname%-git} # using git rev-list to force the latest tag to show up - git describe --long "$(git rev-list --tags --max-count=1)" | sed 's/\([^-]*-g\)/r\1/;s/-/./g' + git describe --long "$(git rev-list --tags --max-count=1)" | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//' } prepare() { cd ${pkgname%-git} - patch -p0 tests/test <<'EOF' -@@ -7,27 +7,23 @@ COMPLETION_SRC="$TEST_DIR"/../yarn-completion.bash - # shellcheck source=./utils.sh - source "$TEST_DIR"/utils.sh - --declare -i FALURES=0 -+declare -i FAILURES=0 - - describe 'Environment checks' - { - it should match yarn version line in src file -- t=$( -- declare actual expected -- actual=$(sed -n 's/# Yarn Version: \([^ ]*\)/\1/p' "$COMPLETION_SRC") -- expected=$(yarn --version) -- if [[ $actual != "${expected%-*}" ]]; then -- prepend ' | ' <<- EOF -- ERROR: mismatched yarn version line in src file. -- -- expected: ${expected%-*} -- received: $actual -- EOF -- exit 1 -- fi -- exit 0 -- ) -- passfail "$t" -+ declare actual expected -+ actual=$(sed -n 's/# Yarn Version: \([^ ]*\)/\1/p' "$COMPLETION_SRC") -+ expected=$(yarn --version) -+ if [[ $actual != "${expected%-*}" ]]; then -+ echo ..WARN -+ prepend ' | ' <<- EOF -+ WARNING: mismatched yarn version line in src file. -+ -+ expected: ${expected%-*} -+ received: $actual -+ EOF -+ fi - } - - describe 'Checking top-level commands' -EOF + patch -p0 tests/test -i ../0001-fix-tests.patch } check() { |