Skip to content

Commit 8dacdc5

Browse files
committed
compress files before upload
1 parent 0993f26 commit 8dacdc5

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ notifications:
4747
jobs:
4848
include:
4949
- stage: deploy
50-
script: grunt package
50+
script: grunt package && grunt compress:uploadBuild
5151
before_script: skip
5252
after_script: echo "after script"
5353
# keep the process alive until the deploy is completed
@@ -68,7 +68,7 @@ jobs:
6868
secret_access_key:
6969
secure: tHIFdSq55qkyZf9zT/3+VkhUrTvOTMuswxXU3KyWaBrSieZqG0UnUDyNm+n3lSfX95zEl/+rJAWbfvhVSxZi13ndOtvRF+MdI1cvow2JynP0aDSiPffEvVrZOmihD6mt2SlMfhskr5FTduQ69kZG6DfLcve1PPDaIwnbOv3phb8=
7070
bucket: ng-i-1121e.appspot.com
71-
local-dir: build
71+
local-dir: upload
7272
skip_cleanup: true
7373
on:
7474
repo: angular/angular.js

Gruntfile.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ module.exports = function(grunt) {
6464
NG_VERSION.cdn = versionInfo.cdnVersion;
6565
var dist = 'angular-' + NG_VERSION.full;
6666

67+
var codeVersion = NG_VERSION.isSnapshot ? 'snapshot' : NG_VERSION.full;
68+
6769
if (versionInfo.cdnVersion == null) {
6870
throw new Error('Unable to read CDN version, are you offline or has the CDN not been properly pushed?\n' +
6971
'Perhaps you want to set the NG1_BUILD_NO_REMOTE_VERSION_REQUESTS environment variable?');
@@ -324,6 +326,15 @@ module.exports = function(grunt) {
324326
expand: true,
325327
dot: true,
326328
dest: dist + '/'
329+
},
330+
uploadBuild: {
331+
options: {
332+
mode: 'gzip'
333+
},
334+
src: ['**'],
335+
cwd: 'build',
336+
expand: true,
337+
dest: 'upload/' + codeVersion + '/'
327338
}
328339
},
329340

0 commit comments

Comments
 (0)