File tree Expand file tree Collapse file tree 4 files changed +9
-22
lines changed
Expand file tree Collapse file tree 4 files changed +9
-22
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,6 @@ notifications:
4848jobs :
4949 include :
5050 - stage : deploy
51- script : grunt package && grunt compress:uploadBuild && echo "branch" && echo $TRAVIS_BRANCH && echo "pull request" && echo $TRAVIS_PULL_REQUEST && echo "tag" && echo $TRAVIS_TAG && echo "DIST_TAG" && echo $DIST_TAG
5251 before_script : skip
5352 before_deploy : |
5453 function keep_alive() {
6766 secure : $FIREBASE_TOKEN
6867 on :
6968 repo : angular/angular.js
70- condition : $TRAVIS_TAG ! = '' && cat package.json | jq '.distTag' = latest
69+ condition : $TRAVIS_TAG = '' && $DISTTAG = next
7170 all_branches : true
7271 - provider : gcs
7372 access_key_id : GOOGLDB7W2J3LFHICF3R
Original file line number Diff line number Diff line change @@ -326,7 +326,7 @@ module.exports = function(grunt) {
326326 dot : true ,
327327 dest : dist + '/'
328328 } ,
329- uploadBuild : {
329+ firebaseCodeDeploy : {
330330 options : {
331331 mode : 'gzip'
332332 } ,
Original file line number Diff line number Diff line change 22
33set -e
44
5- DISTTAG=$( cat package.json | jq ' .distTag' | tr -d \" )
6-
7- echo $TRAVIS_TAG
8- echo $DISTTAG
9-
10- if [[ $TRAVIS_TAG = ' ' && $DISTTAG = " next" ]]; then
11- echo " read from json" ;
12- fi
13-
145yarn global add grunt-cli@1.2.0
156
167mkdir -p $LOGS_DIR
Original file line number Diff line number Diff line change 55export BROWSER_STACK_ACCESS_KEY=` echo $BROWSER_STACK_ACCESS_KEY | rev`
66export SAUCE_ACCESS_KEY=` echo $SAUCE_ACCESS_KEY | rev`
77
8- DISTTAG=$( cat package.json | jq ' .distTag' )
9-
10- echo $TRAVIS_TAG
11- echo $DISTTAG
12-
13- if [[ $DISTTAG = " next" ]]; then
14- echo " read from json" ;
15- fi
16-
178if [ " $JOB " == " ci-checks" ]; then
189 grunt ci-checks
1910elif [ " $JOB " == " unit" ]; then
@@ -40,6 +31,12 @@ elif [ "$JOB" == "e2e" ]; then
4031
4132 export TARGET_SPECS=" test/e2e/tests/**/*.js,$TARGET_SPECS "
4233 grunt test:travis-protractor --specs=" $TARGET_SPECS "
34+ elif [ " $JOB " == " deploy" ]; then
35+ # the DISTTAG is read by the deploy config
36+ export DISTTAG=$( cat package.json | jq ' .distTag' | tr -d \" [:space:] )
37+
38+ grunt package
39+ grunt compress:firebaseCodeDeploy
4340else
44- echo " Unknown job type. Please set JOB=ci-checks, JOB=unit or JOB=e2e-*."
41+ echo " Unknown job type. Please set JOB=ci-checks, JOB=unit, JOB=deploy or JOB=e2e-*."
4542fi
You can’t perform that action at this time.
0 commit comments