Skip to content

Commit 4cc06bc

Browse files
committed
Add a release task
- Push to aws s3 - Expects a local ~/.aws/credentials file
1 parent 0dcfed0 commit 4cc06bc

File tree

4 files changed

+18
-1
lines changed

4 files changed

+18
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules
22
dist/*
3+
.awspublish*

gulpfile.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
var awspublish = require("gulp-awspublish");
12
var gulp = require("gulp");
23
var gutil = require("gulp-util");
34
var karma = require("karma").server;
@@ -58,8 +59,22 @@ gulp.task("test", function(callback) {
5859
}, callback);
5960
});
6061

62+
gulp.task("publish", function() {
63+
var publisher = awspublish.create({
64+
"params": {
65+
"Bucket": "accesslint"
66+
},
67+
});
68+
69+
return gulp.src('./dist/accesslint-0.1.js')
70+
.pipe(publisher.publish())
71+
.pipe(publisher.cache())
72+
.pipe(awspublish.reporter());
73+
});
74+
6175
gulp.task("build", ["webpack:build"]);
6276
gulp.task("default", ["webpack:build-dev", "test"]);
77+
gulp.task("release", ["build", "test", "publish"]);
6378

6479
gulp.task("build-dev", ["webpack:build-dev"], function() {
6580
gulp.watch(["src/**/*"], ["webpack:build-dev"]);

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"chai": "^3.4.1",
3232
"express": "~4.13.3",
3333
"gulp": "^3.9.0",
34+
"gulp-awspublish": "^3.0.1",
3435
"json-loader": "^0.5.4",
3536
"karma": "^0.13.15",
3637
"karma-babel-preprocessor": "^6.0.1",

webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module.exports = {
77
],
88
output: {
99
path: path.join(__dirname, "dist"),
10-
filename: "accesslint.js"
10+
filename: "accesslint-0.1.js"
1111
},
1212
plugins: [],
1313
module: {

0 commit comments

Comments
 (0)