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:
48
48
jobs :
49
49
include :
50
50
- 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
52
51
before_script : skip
53
52
before_deploy : |
54
53
function keep_alive() {
67
66
secure : $FIREBASE_TOKEN
68
67
on :
69
68
repo : angular/angular.js
70
- condition : $TRAVIS_TAG ! = '' && cat package.json | jq '.distTag' = latest
69
+ condition : $TRAVIS_TAG = '' && $DISTTAG = next
71
70
all_branches : true
72
71
- provider : gcs
73
72
access_key_id : GOOGLDB7W2J3LFHICF3R
Original file line number Diff line number Diff line change @@ -326,7 +326,7 @@ module.exports = function(grunt) {
326
326
dot : true ,
327
327
dest : dist + '/'
328
328
} ,
329
- uploadBuild : {
329
+ firebaseCodeDeploy : {
330
330
options : {
331
331
mode : 'gzip'
332
332
} ,
Original file line number Diff line number Diff line change 2
2
3
3
set -e
4
4
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
-
14
5
yarn global add grunt-cli@1.2.0
15
6
16
7
mkdir -p $LOGS_DIR
Original file line number Diff line number Diff line change 5
5
export BROWSER_STACK_ACCESS_KEY=` echo $BROWSER_STACK_ACCESS_KEY | rev`
6
6
export SAUCE_ACCESS_KEY=` echo $SAUCE_ACCESS_KEY | rev`
7
7
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
-
17
8
if [ " $JOB " == " ci-checks" ]; then
18
9
grunt ci-checks
19
10
elif [ " $JOB " == " unit" ]; then
@@ -40,6 +31,12 @@ elif [ "$JOB" == "e2e" ]; then
40
31
41
32
export TARGET_SPECS=" test/e2e/tests/**/*.js,$TARGET_SPECS "
42
33
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
43
40
else
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-*."
45
42
fi
You can’t perform that action at this time.
0 commit comments