test(aio): fix the `deploy-to-firebase` tests
This commit also ensures that if the tests fail, the script exits with an error.
This commit is contained in:
parent
6fb5250185
commit
b14250bef9
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
set +x -eu -o pipefail
|
||||||
|
|
||||||
function check {
|
function check {
|
||||||
if [[ $1 == $2 ]]; then
|
if [[ $1 == $2 ]]; then
|
||||||
|
@ -133,11 +134,11 @@ We only deploy archive branches with the major version less than the stable bran
|
||||||
export TRAVIS_PULL_REQUEST=false
|
export TRAVIS_PULL_REQUEST=false
|
||||||
export TRAVIS_BRANCH=2.4.x
|
export TRAVIS_BRANCH=2.4.x
|
||||||
export STABLE_BRANCH=2.2.x
|
export STABLE_BRANCH=2.2.x
|
||||||
export TRAVIS_COMMIT=$(git ls-remote origin 2.1.x | cut -c-40)
|
export TRAVIS_COMMIT=$(git ls-remote origin 2.4.x | cut -c-40)
|
||||||
export FIREBASE_TOKEN=XXXXX
|
export FIREBASE_TOKEN=XXXXX
|
||||||
`dirname $0`/deploy-to-firebase.sh --dry-run
|
`dirname $0`/deploy-to-firebase.sh --dry-run
|
||||||
)
|
)
|
||||||
expected="Skipping deploy of branch \"2.1.x\" to firebase.
|
expected="Skipping deploy of branch \"2.4.x\" to firebase.
|
||||||
We only deploy archive branches with the major version less than the stable branch: \"2.2.x\""
|
We only deploy archive branches with the major version less than the stable branch: \"2.2.x\""
|
||||||
check "$actual" "$expected"
|
check "$actual" "$expected"
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue