File tree Expand file tree Collapse file tree 5 files changed +45
-8
lines changed Expand file tree Collapse file tree 5 files changed +45
-8
lines changed Original file line number Diff line number Diff line change @@ -57,4 +57,4 @@ after_success:
57
57
cache :
58
58
directories :
59
59
- node_modules
60
- - $HOME/.pub-cache
60
+ - tools/screenshot-test/functions/node_modules
Original file line number Diff line number Diff line change @@ -9,6 +9,19 @@ cd $(dirname $0)/../..
9
9
# If not running as a PR, wait for all other travis modes to finish.
10
10
if [ " $TRAVIS_PULL_REQUEST " = " false" ] && $( npm bin) /travis-after-modes; then
11
11
echo " All travis modes passed. Publishing the build artifacts..."
12
- ./scripts/release/publish-build-artifacts.sh
13
- ./scripts/release/publish-docs-content.sh
14
- fi
12
+ echo " "
13
+
14
+ # Build Material, CDK and the docs before publishing artifacts
15
+ $( npm bin) /gulp material:build-release:clean
16
+ $( npm bin) /gulp material-examples:build-release
17
+ $( npm bin) /gulp docs
18
+
19
+ # Run publishing of artifacts in parallel. This is possible because the output has been built before.
20
+ ./scripts/release/publish-build-artifacts.sh --no-build &
21
+ ./scripts/release/publish-docs-content.sh --no-build &
22
+
23
+ # Deploy the screenshot functions for each push build.
24
+ ./scripts/release/deploy-screenshot-functions.sh &
25
+
26
+ wait
27
+ # fi
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Go to the project root directory
4
+ cd $( dirname ${0} ) /../..
5
+
6
+ # Install node modules for screenshot functions. Firebase CLI needs to execute the functions
7
+ # before it can collect all functions and deploy them.
8
+ (cd tools/screenshot-test/functions; npm install)
9
+
10
+ if [ -z ${MATERIAL2_SCREENSHOT_ACCESS_TOKEN} ]; then
11
+ echo " Error: No access token for firebase specified." \
12
+ " Please set the environment variable 'MATERIAL2_SCREENSHOT_ACCESS_TOKEN'."
13
+ exit 1
14
+ fi
15
+
16
+ # Deploy the screenshot functions to Firebase
17
+ $( npm bin) /firebase deploy --only functions --token ${MATERIAL2_SCREENSHOT_ACCESS_TOKEN}
Original file line number Diff line number Diff line change @@ -12,6 +12,9 @@ cd $(dirname ${0})/../..
12
12
PACKAGES=(cdk material)
13
13
REPOSITORIES=(cdk-builds material2-builds)
14
14
15
+ # Command line arguments.
16
+ COMMAND_ARGS=${* }
17
+
15
18
# Function to publish artifacts of a package to Github.
16
19
# @param ${1} Name of the package
17
20
# @param ${2} Repository name of the package.
@@ -30,8 +33,10 @@ publishPackage() {
30
33
repoUrl=" https://github.com/angular/${packageRepo} .git"
31
34
repoDir=" tmp/${packageRepo} "
32
35
33
- # Create a release of the current repository.
34
- $( npm bin) /gulp ${packageName} :build-release:clean
36
+ if [[ ! ${COMMAND_ARGS} == * --no-build* ]]; then
37
+ # Create a release of the current repository.
38
+ $( npm bin) /gulp ${packageName} :build-release:clean
39
+ fi
35
40
36
41
# Prepare cloning the builds repository
37
42
rm -rf ${repoDir}
Original file line number Diff line number Diff line change @@ -11,8 +11,10 @@ repoPath="/tmp/material2-docs-content"
11
11
repoUrl=" https://github.com/angular/material2-docs-content"
12
12
examplesSource=" ./dist/docs/examples"
13
13
14
- $( npm bin) /gulp material-examples:build-release:clean
15
- $( npm bin) /gulp docs
14
+ if [[ ! ${* } == * --no-build* ]]; then
15
+ $( npm bin) /gulp material-examples:build-release:clean
16
+ $( npm bin) /gulp docs
17
+ fi
16
18
17
19
# Get git meta info for commit
18
20
commitSha=" $( git rev-parse --short HEAD) "
You can’t perform that action at this time.
0 commit comments