Create a tarball of the static pages for production release

pull/13940/head
Sergio Conde Gomez 6 years ago
parent 7b7c0cdf5c
commit 921fda7d74
No known key found for this signature in database
GPG Key ID: 8F69FE40E7C717C3

1
.gitignore vendored

@ -74,3 +74,4 @@ doc/manual/build
/private_gears
/dist
yarn.lock
public/static.tar.gz

@ -107,6 +107,7 @@ module.exports = function (grunt) {
process.exit(1);
}
var PUBLIC_DIR = './public/';
var ROOT_ASSETS_DIR = './public/assets/';
var ASSETS_DIR = './public/assets/<%= pkg.version %>';
@ -135,6 +136,7 @@ module.exports = function (grunt) {
aws: aws,
env: env,
public_dir: PUBLIC_DIR,
assets_dir: ASSETS_DIR,
root_assets_dir: ROOT_ASSETS_DIR,
@ -158,6 +160,9 @@ module.exports = function (grunt) {
jasmine: jasmineCfg,
// Create a tarball of the static pages for production release
compress: require('./lib/build/tasks/compress.js').task(),
s3: require('./lib/build/tasks/s3.js').task(),
exorcise: require('./lib/build/tasks/exorcise.js').task(),
@ -388,6 +393,7 @@ module.exports = function (grunt) {
grunt.registerTask('release', [
'check_release',
'build',
'compress',
's3',
'invalidate'
]);

@ -1,27 +1,24 @@
module.exports = {
task: function () {
return {
javascripts: {
options: {
mode: 'gzip'
},
expand: true,
cwd: '<%= assets_dir %>/javascripts/',
src: ['**/*.min.js'],
dest: '<%= assets_dir %>/javascripts/',
ext: '.js'
exports.task = function () {
return {
main: {
options: {
archive: '<%= public_dir %>/static.tar.gz'
},
css: {
options: {
mode: 'gzip'
},
expand: true,
cwd: '<%= assets_dir %>/stylesheets/',
src: ['**/*.css'],
dest: '<%= assets_dir %>/stylesheets/',
ext: '.css'
}
};
}
files: [
{
expand: true,
cwd: '<%= public_dir %>',
dest: '/',
src: [
'*.html',
'crossdomain.xml',
'robots.txt',
'static/**',
'maintenance/**',
'favicons/**'
]
}
]
}
};
};

@ -95,7 +95,13 @@ module.exports = {
cwd: '<%= assets_dir %>',
src: ['images/avatars/*.png', 'images/alphamarker.png', 'images/google-maps-basemap-icons/*.jpg', 'images/carto.png'],
dest: 'cartodbui/assets/unversioned/'
}
},
static_pages: {
cwd: '<%= public_dir %>',
src: ['static.tar.gz'],
dest: 'cartodbui/'
},
};
}
};

@ -86,7 +86,7 @@
"grunt-cli": "~0.1.13",
"grunt-contrib-clean": "0.7.0",
"grunt-contrib-compass": "1.0.4",
"grunt-contrib-compress": "0.14.0",
"grunt-contrib-compress": "1.4.3",
"grunt-contrib-concat": "1.0.1",
"grunt-contrib-connect": "0.11.2",
"grunt-contrib-copy": "0.8.1",

Loading…
Cancel
Save