build: use travis build stages (#4766)

This commit is contained in:
Paul Gschwendtner
2017-05-25 22:37:00 +02:00
committed by tinayuangao
parent 1789f40722
commit 58c8404d73
4 changed files with 45 additions and 46 deletions
-27
View File
@@ -1,27 +0,0 @@
#!/bin/bash
# Script which always runs when the current Travis mode succeeds.
# Used to run the travis-after-modes script, which checks if all other modes finished.
# Go to the project root directory
cd $(dirname $0)/../..
# If not running as a PR, wait for all other travis modes to finish.
if [ "$TRAVIS_PULL_REQUEST" = "false" ] && $(npm bin)/travis-after-modes; then
echo "All travis modes passed. Publishing the build artifacts..."
echo ""
# Build Material, CDK and the docs before publishing artifacts
$(npm bin)/gulp material:build-release:clean
$(npm bin)/gulp material-examples:build-release
$(npm bin)/gulp docs
# Run publishing of artifacts in parallel. This is possible because the output has been built before.
./scripts/release/publish-build-artifacts.sh --no-build &
./scripts/release/publish-docs-content.sh --no-build &
# Deploy the screenshot functions for each push build.
./scripts/release/deploy-screenshot-functions.sh &
wait
#fi
+30
View File
@@ -0,0 +1,30 @@
#!/bin/bash
# Script that runs after the testing stage of Travis passed.
# Build artifacts and docs content will be published to different repositories.
# Go to the project root directory
cd $(dirname $0)/../..
if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then
echo "Build artifacts and docs content will only be deployed in Travis push builds."
exit 0;
fi
echo "Starting to publish the build artifacts and docs content..."
echo ""
# Build Material, CDK and the docs before publishing artifacts
$(npm bin)/gulp material:build-release:clean
$(npm bin)/gulp material-examples:build-release
$(npm bin)/gulp docs
# Run publishing of artifacts in parallel.
# This is possible because the output has been built before.
./scripts/release/publish-build-artifacts.sh --no-build &
./scripts/release/publish-docs-content.sh --no-build &
# Deploy the screenshot functions for each push build.
./scripts/release/deploy-screenshot-functions.sh &
wait