mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
964033ce8d
* build: add dashboard firebase functions * Adds a new folder for the dashboard project that for now only contains firebase functions. * The firebase functions will be used to securely make API calls to the Github API (e.g payload status) * Functions will be automatically deployed as same as screenshot functions. * Address feedback
18 lines
614 B
Bash
Executable File
18 lines
614 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Go to the project root directory
|
|
cd $(dirname ${0})/../..
|
|
|
|
# Install node modules for screenshot functions. Firebase CLI needs to execute the functions
|
|
# before it can collect all functions and deploy them.
|
|
(cd tools/screenshot-test/functions; npm install)
|
|
|
|
if [ -z ${MATERIAL2_SCREENSHOT_ACCESS_TOKEN} ]; then
|
|
echo "Error: No access token for firebase specified." \
|
|
"Please set the environment variable 'MATERIAL2_SCREENSHOT_ACCESS_TOKEN'."
|
|
exit 1
|
|
fi
|
|
|
|
# Deploy the screenshot functions to Firebase
|
|
$(npm bin)/firebase deploy --only functions --token ${MATERIAL2_SCREENSHOT_ACCESS_TOKEN}
|