build(aio): add staging environment
You can now specify what environment you are building by add it to the `yarn build` command. For example: ``` yarn build -- --env=stage ``` Moreover the `deploy-to-firebase.sh` script will automatically apply the appropriate environment.
This commit is contained in:

committed by
Pete Bacon Darwin

parent
541c9a94bf
commit
052331fabc
@ -8,11 +8,13 @@ readonly deployEnv=$1
|
||||
|
||||
case $deployEnv in
|
||||
staging)
|
||||
readonly buildEnv=stage
|
||||
readonly projectId=aio-staging
|
||||
readonly deployedUrl=https://$projectId.firebaseapp.com/
|
||||
readonly firebaseToken=$FIREBASE_TOKEN
|
||||
;;
|
||||
production)
|
||||
readonly buildEnv=prod
|
||||
readonly projectId=angular-io
|
||||
readonly deployedUrl=https://angular.io/
|
||||
readonly firebaseToken=$FIREBASE_TOKEN
|
||||
@ -27,7 +29,7 @@ esac
|
||||
cd "`dirname $0`/.."
|
||||
|
||||
# Build the app
|
||||
yarn build
|
||||
yarn build -- --env=$buildEnv
|
||||
|
||||
# Deploy to Firebase
|
||||
firebase use "$projectId" --token "$firebaseToken"
|
||||
|
Reference in New Issue
Block a user