summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorObserverOfTime2021-01-17 15:58:25 +0200
committerObserverOfTime2021-01-17 15:58:25 +0200
commit29d7c90f6bbacd8d5195f1a907b476f6d27d2b45 (patch)
tree2a3a9a417499820a50e759ff7f3fe63b69e2a062
parent23e1a3c278350555b9ecc88bf086ded1aa5fb919 (diff)
downloadaur-29d7c90f6bbacd8d5195f1a907b476f6d27d2b45.tar.gz
Fix pkgver & move patch to a file
-rw-r--r--.SRCINFO8
-rw-r--r--0001-fix-tests.patch41
-rw-r--r--PKGBUILD54
3 files changed, 52 insertions, 51 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ed0b77c39d9b..36472674c8ce 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = yarn-completion-git
pkgdesc = Bash completion for Yarn
- pkgver = v0.17.0.r0.g30262cf
- pkgrel = 4
+ pkgver = 0.17.0.r0.g30262cf
+ pkgrel = 5
url = https://github.com/dsifford/yarn-completion
arch = any
license = MIT
@@ -10,7 +10,9 @@ pkgbase = yarn-completion-git
depends = bash-completion
depends = yarn
source = git+https://github.com/dsifford/yarn-completion.git
- md5sums = SKIP
+ source = 0001-fix-tests.patch
+ sha256sums = SKIP
+ sha256sums = e00774fa650fb037ae62e0963308baee7509a4bbeea445193684db2c2e8a18d2
pkgname = yarn-completion-git
diff --git a/0001-fix-tests.patch b/0001-fix-tests.patch
new file mode 100644
index 000000000000..137b40d9b4fa
--- /dev/null
+++ b/0001-fix-tests.patch
@@ -0,0 +1,41 @@
+@@ -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'
diff --git a/PKGBUILD b/PKGBUILD
index 6a1df9991847..14d70fbd63e8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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() {