File tree Expand file tree Collapse file tree 4 files changed +48
-1
lines changed Expand file tree Collapse file tree 4 files changed +48
-1
lines changed Original file line number Diff line number Diff line change @@ -28,4 +28,7 @@ node_modules
2828.lock-wscript
2929
3030.DS_Store
31+
32+ # Generated files
3133bundle.js
34+ dist /
Original file line number Diff line number Diff line change @@ -10,3 +10,14 @@ before_install:
1010 - tar -xjf phantomjs-2.0.0-ubuntu-12.04.tar.bz2
1111 - export PATH=$PWD:$PATH
1212script : npm run ci
13+ # whenever a tag is pushed, we deploy to github releases
14+ before_deploy : npm run release
15+ deploy :
16+ provider : releases
17+ api_key : $GH_TOKEN
18+ file : " dist/chromeide.zip"
19+ skip_cleanup : true
20+ on :
21+ tags : true
22+ node : ' 0.10'
23+ all_branches : true
Original file line number Diff line number Diff line change 22
33const path = require ( 'path' ) ;
44
5+ const del = require ( 'del' ) ;
56const gulp = require ( 'gulp' ) ;
67const chalk = require ( 'chalk' ) ;
8+ const zip = require ( 'gulp-zip' ) ;
79const gutil = require ( 'gulp-util' ) ;
810const webpack = require ( 'webpack' ) ;
911
1012const shouldWatch = ( process . argv . indexOf ( '--watch' ) !== - 1 ) ;
1113
14+ const files = {
15+ release : [
16+ 'manifest.json' ,
17+ 'index.html' ,
18+ 'bundle.js' ,
19+ 'background.js' ,
20+ '_locales/**' ,
21+ 'icons/**'
22+ ]
23+ } ;
24+
1225const webpackConfig = {
1326 entry : './client.js' ,
1427 output : {
@@ -65,4 +78,20 @@ function js(cb){
6578 } ) ;
6679}
6780
81+ function release ( ) {
82+ return gulp . src ( files . release , { base : __dirname } )
83+ . pipe ( zip ( 'chromeide.zip' ) )
84+ . pipe ( gulp . dest ( 'dist' ) ) ;
85+ }
86+
87+ function postinstall ( cb ) {
88+ // .pem files cause Chrome to show a bunch of warnings
89+ // so we remove them on postinstall
90+ del ( 'node_modules/**/*.pem' , cb ) ;
91+ }
92+
93+ gulp . task ( release ) ;
94+ gulp . task ( postinstall ) ;
95+
96+ gulp . task ( 'gh-release' , gulp . series ( js , release ) ) ;
6897gulp . task ( 'default' , gulp . parallel ( js ) ) ;
Original file line number Diff line number Diff line change 2626 "browser-serialport" : " git://github.com/garrows/browser-serialport#update" ,
2727 "chalk" : " ^1.0.0" ,
2828 "css-loader" : " ^0.9.1" ,
29+ "del" : " ^1.1.1" ,
2930 "expect" : " git://github.com/phated/expect" ,
3031 "gulp" : " git://github.com/gulpjs/gulp#4.0" ,
3132 "gulp-util" : " ^3.0.4" ,
33+ "gulp-zip" : " ^2.0.3" ,
3234 "html-loader" : " ^0.2.3" ,
3335 "json-loader" : " ^0.5.1" ,
3436 "level-js" : " ^2.1.6" ,
4143 "scripts" : {
4244 "test" : " zuul test/*.js --local --open" ,
4345 "ci" : " zuul test/*.js --phantom" ,
44- "build" : " gulp"
46+ "build" : " gulp" ,
47+ "release" : " gulp gh-release" ,
48+ "postinstall" : " gulp postinstall"
4549 },
4650 "repository" : {
4751 "type" : " git" ,
You can’t perform that action at this time.
0 commit comments