Skip to content

Commit 94e7738

Browse files
committed
readd gcs deploy
1 parent 840780b commit 94e7738

File tree

2 files changed

+20
-16
lines changed

2 files changed

+20
-16
lines changed

.travis.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ notifications:
4848
jobs:
4949
include:
5050
- stage: deploy
51-
script: grunt package && grunt compress:uploadBuild && echo $TRAVIS_BRANCH && echo $TRAVIS_TAG
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
5252
before_script: skip
5353
before_deploy: |
5454
function keep_alive() {
@@ -67,18 +67,18 @@ jobs:
6767
secure: $FIREBASE_TOKEN
6868
on:
6969
repo: angular/angular.js
70-
condition: $TRAVIS_BRANCH = chore-firebase
70+
condition: $TRAVIS_TAG != '' && cat package.json | jq '.distTag' = latest
7171
all_branches: true
72-
# - provider: gcs
73-
# access_key_id: GOOGLDB7W2J3LFHICF3R
74-
# secret_access_key:
75-
# secure: tHIFdSq55qkyZf9zT/3+VkhUrTvOTMuswxXU3KyWaBrSieZqG0UnUDyNm+n3lSfX95zEl/+rJAWbfvhVSxZi13ndOtvRF+MdI1cvow2JynP0aDSiPffEvVrZOmihD6mt2SlMfhskr5FTduQ69kZG6DfLcve1PPDaIwnbOv3phb8=
76-
# bucket: ng-i-1121e.appspot.com
77-
# local-dir: upload
78-
# skip_cleanup: true
79-
# detect_encoding: true # detects gzip compression and sets the correct metadata in gcs
80-
# on:
81-
# repo: angular/angular.js
82-
# branch: chore-firebase
83-
# condition: $TRAVIS_TAG != on_failurese || ($TRAVIS_PR == false && $TRAVIS_BRANCH = master) || $TRAVIS_BRANCH = chore-firebase
72+
- provider: gcs
73+
access_key_id: GOOGLDB7W2J3LFHICF3R
74+
secret_access_key:
75+
secure: tHIFdSq55qkyZf9zT/3+VkhUrTvOTMuswxXU3KyWaBrSieZqG0UnUDyNm+n3lSfX95zEl/+rJAWbfvhVSxZi13ndOtvRF+MdI1cvow2JynP0aDSiPffEvVrZOmihD6mt2SlMfhskr5FTduQ69kZG6DfLcve1PPDaIwnbOv3phb8=
76+
bucket: code-angularjs-org-338b8.appspot.com
77+
local-dir: upload
78+
skip_cleanup: true
79+
detect_encoding: true # detects gzip compression
80+
on:
81+
repo: angular/angular.js
82+
all_branches: true
83+
condition: $TRAVIS_TAG != '' || ($TRAVIS_PULL_REQUEST = false && $TRAVIS_BRANCH = master)
8484

Gruntfile.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ if (!process.env.TRAVIS && !process.env.JENKINS_HOME) {
4949
}
5050
}
5151

52-
5352
module.exports = function(grunt) {
5453

5554
// this loads all the node_modules that start with `grunt-` as plugins
@@ -388,6 +387,11 @@ module.exports = function(grunt) {
388387
grunt.registerTask('package', ['bower', 'validate-angular-files', 'clean', 'buildall', 'minall', 'collect-errors', 'write', 'docs', 'copy', 'compress:build']);
389388
grunt.registerTask('ci-checks', ['ddescribe-iit', 'merge-conflict', 'eslint']);
390389
grunt.registerTask('default', ['package']);
390+
391+
392+
console.log(pkg.distTag);
393+
console.log(process.env.DIST_TAG);
394+
391395
};
392396

393397

@@ -399,4 +403,4 @@ function reportOrFail(message) {
399403
console.log(message);
400404
console.log('===============================================================================');
401405
}
402-
}
406+
}

0 commit comments

Comments
 (0)