返回 CodeWhale
check-npm-binary-version.test.sh
根目录 / scripts / release / check-npm-binary-version.test.sh
1 #!/usr/bin/env bash
2 set -euo pipefail
3
4 repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
5 check="${repo_root}/scripts/release/check-npm-binary-version.sh"
6
7 "${check}" 0.9.11 0.9.11
8
9 if "${check}" 0.9.11 0.9.10 >/dev/null 2>&1; then
10 echo "expected an unapproved npm binary mismatch to fail" >&2
11 exit 1
12 fi
13
14 CODEWHALE_ALLOW_NPM_BINARY_MISMATCH=1 \
15 "${check}" 0.9.11 0.9.10 >/dev/null
16
17 echo "npm binary-version mismatch gate tests passed"
18
18 lines BASH