Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
chore(docs.angularjs.org): install firebase dependencies before deplo…
Browse files Browse the repository at this point in the history
…ying

Firebase is trying to execute our functions code locally in order to
parse the triggers. Install npm dependencies to avoid errors like:

```
Error: Error parsing triggers: Cannot find module 'firebase-functions'
```

Closes #16453
  • Loading branch information
gkalpak committed Feb 12, 2018
1 parent fb47918 commit ba140db
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ build steps.
Creates a server at localhost:5000 that serves from deploy/docs and uses the local function

See /scripts/code.angularjs.org-firebase/readme.firebase.code.md for the firebase deployment to
code.angularjs.org
code.angularjs.org
13 changes: 12 additions & 1 deletion scripts/travis/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

set -e

readonly THIS_DIR=$(cd $(dirname $0); pwd)
readonly ROOT_DIR="$THIS_DIR/../.."

export BROWSER_STACK_ACCESS_KEY
export SAUCE_ACCESS_KEY

Expand Down Expand Up @@ -80,6 +83,14 @@ case "$JOB" in

if [[ "$DEPLOY_DOCS" == true || "$DEPLOY_CODE" == true ]]; then
grunt prepareDeploy

if [[ "$DEPLOY_DOCS" == true ]]; then
# Install npm dependencies for Firebase functions.
(
cd "$ROOT_DIR/scripts/docs.angularjs.org-firebase/functions"
npm install
)
fi
else
echo "Skipping deployment build because conditions have not been met."
fi
Expand All @@ -94,4 +105,4 @@ case "$JOB" in
or\
'deploy'."
;;
esac
esac

0 comments on commit ba140db

Please sign in to comment.