Skip to content

Commit

Permalink
misc(build): cleanup extension package zip using gulp (#6210)
Browse files Browse the repository at this point in the history
  • Loading branch information
wardpeet authored and paulirish committed Oct 11, 2018
1 parent 32b02f1 commit d9210d8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ git push --tags
echo "Rebuild extension and viewer to get the latest, tagged master commit"
yarn build-all;

# zip the extension files, but remove lh-dt-bundle & lh-lr-bundle as it's not needed
cd lighthouse-extension; command rm -f dist/scripts/lighthouse-dt-bundle.js dist/scripts/lighthouse-lr-bundle.js; gulp package; cd ..
# zip the extension files
cd lighthouse-extension; gulp package; cd ..
echo "Go here: https://chrome.google.com/webstore/developer/edit/blipmdconlkpinefehnmjammfjpmpbjk "
echo "Upload the package zip to CWS dev dashboard"

Expand Down
15 changes: 12 additions & 3 deletions lighthouse-extension/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,18 @@ gulp.task('watch', ['browserify', 'html'], () => {

gulp.task('package', function() {
const manifest = require(`./${distDir}/manifest.json`);
return gulp.src(`${distDir}/**`)
.pipe(zip(`lighthouse-${manifest.version}.zip`))
.pipe(gulp.dest('package'));

return del([
`${distDir}/scripts/${CONSUMERS.DEVTOOLS.dist}`,
`${distDir}/scripts/${CONSUMERS.LIGHTRIDER.dist}`,
])
.then(paths =>
paths.forEach(path => gutil.log('deleted:', gutil.colors.blue(path))))
.then(() =>
gulp.src(`${distDir}/**`)
.pipe(zip(`lighthouse-${manifest.version}.zip`))
.pipe(gulp.dest('package'))
);
});

gulp.task('build', cb => {
Expand Down

0 comments on commit d9210d8

Please sign in to comment.