Warn on yarn version mismatch

This commit is contained in:
Observer of Time 2020-10-12 16:17:18 +03:00
parent e24a23ed4d
commit 90b02ccf6d
Signed by: chronobserver
GPG Key ID: 8A2DEA1DBAEBCA9E
2 changed files with 29 additions and 4 deletions

View File

@ -1,6 +1,6 @@
pkgbase = yarn-completion-git
pkgdesc = Bash completion for Yarn
pkgver = v0.16.0.r0.g2821c67
pkgver = v0.16.0.r2.g5bf2968
pkgrel = 2
url = https://github.com/dsifford/yarn-completion
arch = any

View File

@ -2,7 +2,7 @@
_pkgname=yarn-completion
pkgname=yarn-completion-git
pkgver=v0.16.0.r0.g2821c67
pkgver=v0.16.0.r2.g5bf2968
pkgrel=2
pkgdesc='Bash completion for Yarn'
url='https://github.com/dsifford/yarn-completion'
@ -20,8 +20,33 @@ pkgver() {
prepare() {
cd "$srcdir/$_pkgname"
sed -i "$_pkgname.bash" -e \
"s/\(# Yarn Version: \).*/\1$(yarn --version)/"
patch -p0 tests/test <<'EOF'
@@ -7,7 +7,7 @@ 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'
{
@@ -18,12 +18,12 @@ describe 'Environment checks'
expected=$(yarn --version)
if [[ $actual != "${expected%-*}" ]]; then
prepend ' | ' <<- EOF
- ERROR: mismatched yarn version line in src file.
+ WARNING: mismatched yarn version line in src file.
expected: ${expected%-*}
received: $actual
EOF
- exit 1
+ exit 0
fi
exit 0
)
EOF
}
check() {