mirror of
https://github.com/kremalicious/appstorebadges.git
synced 2024-11-21 17:27:12 +01:00
deploy task
This commit is contained in:
parent
570087a331
commit
eba08159de
34
gulpfile.js
34
gulpfile.js
@ -21,7 +21,10 @@ var onError = function(error) {
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
var src = 'src/',
|
||||
dist = 'dist/';
|
||||
dist = 'dist/',
|
||||
s3bucket = 'lab.kremalicious.com',
|
||||
s3path = '/appstorebadges/',
|
||||
s3region = 'eu-central-1';
|
||||
|
||||
|
||||
// code banner
|
||||
@ -112,3 +115,32 @@ gulp.task('default', ['css', 'html', 'watch', 'connect']);
|
||||
// Full build
|
||||
//
|
||||
gulp.task('build', ['css', 'html']);
|
||||
|
||||
|
||||
//
|
||||
// Deploy to S3
|
||||
//
|
||||
gulp.task('deploy', function() {
|
||||
var publisher = $.awspublish.create({
|
||||
params: {
|
||||
'Bucket': s3bucket
|
||||
},
|
||||
'region': s3region
|
||||
});
|
||||
|
||||
// define custom headers
|
||||
var headers = {
|
||||
'Cache-Control': 'max-age=315360000, no-transform, public',
|
||||
'x-amz-acl': 'public-read'
|
||||
};
|
||||
|
||||
return gulp.src(dist + '*')
|
||||
.pipe($.rename(function (path) {
|
||||
path.dirname += s3path;
|
||||
}))
|
||||
.pipe($.awspublish.gzip({ ext: '' })) // gzip all the things
|
||||
.pipe(publisher.publish(headers))
|
||||
.pipe($.awspublish.reporter({
|
||||
states: ['create', 'update', 'delete']
|
||||
}));
|
||||
});
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "appstorebadges",
|
||||
"version": "1.0.0",
|
||||
"version": "0.0.9",
|
||||
"author": {
|
||||
"name": "Matthias Kretschmann",
|
||||
"email": "m@kretschmann.io"
|
||||
@ -17,13 +17,14 @@
|
||||
"gulp": ">=3.8.0",
|
||||
"gulp-assemble": ">=0.3.2",
|
||||
"gulp-autoprefixer": ">=2.3.0",
|
||||
"gulp-awspublish": ">=3.0.0",
|
||||
"gulp-connect": ">=2.0.5",
|
||||
"gulp-cssmin": ">=0.1.7",
|
||||
"gulp-extname": ">=0.2.0",
|
||||
"gulp-header": "^1.7.1",
|
||||
"gulp-htmlmin": ">=1.1.4",
|
||||
"gulp-load-plugins": ">=0.10.0",
|
||||
"gulp-rename": "^1.2.2",
|
||||
"gulp-rename": ">=1.2.2",
|
||||
"gulp-stylus": ">=2.0.6",
|
||||
"gulp-util": ">=3.0.6",
|
||||
"normalize.css": "^3.0.3"
|
||||
|
Loading…
Reference in New Issue
Block a user