Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misc(build): cleanup extension package zip using gulp #6210

Merged
merged 7 commits into from
Oct 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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