build: use subshells when changing directories

This prevents being left in the wrong directory in case of error.
This commit is contained in:
Georgios Kalpakas
2017-05-12 22:07:51 +03:00
committed by Igor Minar
parent 21d213dfc7
commit 06264645fd
7 changed files with 114 additions and 109 deletions
+2 -2
View File
@@ -40,6 +40,7 @@ travisFoldEnd "tsc a bunch of useless stuff"
# Build angular.io
if [[ ${CI_MODE:-} == "aio" ]]; then
travisFoldStart "build.aio"
(
cd "`dirname $0`/../../aio"
yarn build
@@ -52,7 +53,6 @@ if [[ ${CI_MODE:-} == "aio" ]]; then
yarn deploy-preview -- --skip-build
travisFoldEnd "deploy.aio.pr-preview"
fi
cd -
)
travisFoldEnd "build.aio"
fi