Files
angular__angular/scripts/ci/travis-deploy.sh
T
Paul Gschwendtner dabcd53bc9 build: separate deploy jobs in deploy build stage (#5621)
Currently every deployment runs in a single Travis job concurrently. This messes up the logs and it's also hard to see what actually runs at all.

The different deployment jobs should run concurrently in the deploy build stage.
2017-07-10 11:38:09 -07:00

39 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
# Script that runs in the deploy stage 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)/../..
# If the current Travis job is triggered by a pull request skip the deployment.
# This check is necessary because Travis still tries to run the deploy build-stage for
# pull requests.
if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then
echo "Build artifacts and docs content will only be deployed in Travis push builds."
exit 0;
fi
echo ""
echo "Starting the deployment script. Running mode: ${DEPLOY_MODE}"
echo ""
if [[ "${DEPLOY_MODE}" == "build-artifacts" ]]; then
./scripts/deploy/publish-build-artifacts.sh
fi
if [[ "${DEPLOY_MODE}" == "docs-content" ]]; then
./scripts/deploy/publish-docs-content.sh
fi
if [[ "${DEPLOY_MODE}" == "screenshot-tool" ]]; then
./scripts/deploy/deploy-screenshot-functions.sh
fi
if [[ "${DEPLOY_MODE}" == "dashboard" ]]; then
./scripts/deploy/deploy-dashboard.sh
fi