ci(aio): convert `deploy-staging` to a shell script

This commit is contained in:
Georgios Kalpakas 2017-04-01 15:09:39 +03:00 committed by Pete Bacon Darwin
parent 2535769a65
commit a73050de48
2 changed files with 19 additions and 3 deletions

View File

@ -14,15 +14,13 @@
"pree2e": "yarn ~~update-webdriver",
"e2e": "yarn check-env && ng e2e --no-webdriver-update",
"deploy-preview": "scripts/deploy-preview.sh",
"deploy-staging": "firebase use staging --token \"$FIREBASE_TOKEN\" && yarn ~~deploy",
"deploy-staging": "scripts/deploy-staging.sh",
"check-env": "node ../tools/check-environment.js",
"predocs": "rimraf src/content",
"docs": "dgeni ./transforms/angular.io-package",
"docs-lint": "eslint --ignore-path=\"transforms/.eslintignore\" transforms",
"docs-test": "node ../dist/tools/cjs-jasmine/index-tools ../../transforms/**/*.spec.js",
"~~update-webdriver": "webdriver-manager update --standalone false --gecko false",
"pre~~deploy": "yarn build",
"~~deploy": "firebase deploy --message \"Commit: $TRAVIS_COMMIT\" --non-interactive --token \"$FIREBASE_TOKEN\"",
"boilerplate:add": "node ./tools/examples/add-example-boilerplate add",
"boilerplate:remove": "node ./tools/examples/add-example-boilerplate remove",
"generate-plunkers": "node ./tools/plunker-builder/generatePlunkers"

View File

@ -0,0 +1,18 @@
#!/usr/bin/env bash
# WARNING: FIREBASE_TOKEN should NOT be printed.
set +x -eu -o pipefail
FIREBASE_PROJECT_ID=aio-staging
cd "`dirname $0`/.."
# Build the app
yarn build
# Deploy to staging
firebase use "$FIREBASE_PROJECT_ID" --token "$FIREBASE_TOKEN"
firebase deploy --message "Commit: $TRAVIS_COMMIT" --non-interactive --token "$FIREBASE_TOKEN"
cd -