forked from angular/material.angular.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
executable file
·33 lines (24 loc) · 935 Bytes
/
deploy.sh
File metadata and controls
executable file
·33 lines (24 loc) · 935 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
set -eu -o pipefail
declare -A PROJECT_ID
# Firebase project ids
PROJECT_ID["stable", "dev"]="material2-docs-dev"
PROJECT_ID["stable", "prod"]="material-angular-io"
PROJECT_ID["stable", "beta"]="beta-angular-material-io"
PROJECT_ID["v5", "dev"]="material2-docs-5"
PROJECT_ID["v5", "prod"]="v5-material-angular-io"
PROJECT_ID["v6", "dev"]="material2-docs-6"
PROJECT_ID["v6", "prod"]="v6-material-angular-io"
version=${1:-stable}
mode=${2:-dev}
projectId=${PROJECT_ID[$version, $mode]}
echo ""
echo "NOTE: Make sure to refresh the docs-content to match the new version of docs."
echo " You can pull the docs-content for the new version by updating the"
echo " \"@angular/material-examples\" in the 'package.json' file."
echo ""
read -p "Press <ENTER> to continue.."
npm run build-themes
$(npm bin)/ng build --aot --prod --build-optimizer=false
$(npm bin)/firebase use $projectId
$(npm bin)/firebase deploy