build: better error reporting of bash scripts (#5397)

Currently whenever something fails in the deploy script it will likely not cause the CI to show the failure. This is because Bash by default doesn't exit the process with the proper error code.
This commit is contained in:
Paul Gschwendtner
2017-06-29 19:32:00 +02:00
committed by tinayuangao
parent 69bea28186
commit d859d34739
6 changed files with 15 additions and 1 deletions
+1
View File
@@ -1,5 +1,6 @@
#!/bin/bash
# The script should immediately exit if any command in the script fails.
set -e
echo ""
+3
View File
@@ -3,6 +3,9 @@
# Script that runs after the testing stage of Travis passed.
# Build artifacts and docs content will be published to different repositories.
# The script should immediately exit if any command in the script fails.
set -e
# Go to the project root directory
cd $(dirname $0)/../..
+3
View File
@@ -1,5 +1,8 @@
#!/bin/bash
# The script should immediately exit if any command in the script fails.
set -e
# This script deploys the Dashboard App and their Cloud Functions to Firebase.
# Before the script installs all dependencies and builds the dashboard app in production.
@@ -1,5 +1,8 @@
#!/bin/bash
# The script should immediately exit if any command in the script fails.
set -e
# Go to the project root directory
cd $(dirname ${0})/../..
+2 -1
View File
@@ -3,7 +3,8 @@
# Script to publish the build artifacts to a GitHub repository.
# Builds will be automatically published once new changes are made to the repository.
set -e -o pipefail
# The script should immediately exit if any command in the script fails.
set -e
# Go to the project root directory
cd $(dirname ${0})/../..
+3
View File
@@ -3,6 +3,9 @@
# Publish material2 docs assets to the material2-docs-content repo
# material.angular.io will pull from this assets repo to get the latest docs
# The script should immediately exit if any command in the script fails.
set -e
cd "$(dirname $0)/../../"
docsPath="./dist/docs"