Skip to content

Commit

Permalink
Merge pull request zxlie#83 from zxlie/revert-82-master
Browse files Browse the repository at this point in the history
Revert "使用GitHub Action自动打包crx扩展,并利用GitHub进行自动更新"
  • Loading branch information
zxlie authored Jan 15, 2020
2 parents 7c794be + 5e53ca3 commit 020ea43
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 58 deletions.
32 changes: 0 additions & 32 deletions .github/workflows/build.yml

This file was deleted.

26 changes: 2 additions & 24 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ let watchPath = require('gulp-watch-path');
let gcallback = require('gulp-callback');

gulp.task('clean', () => {
return gulp.src(['output','chrome'], {read: false}).pipe(clean({force: true}));
return gulp.src('output', {read: false}).pipe(clean({force: true}));
});

gulp.task('copy', () => {
Expand Down Expand Up @@ -155,24 +155,6 @@ gulp.task('zip', () => {

});

// 打包成crx
gulp.task('_crx',() => {
let pathOfMF = './output/apps/manifest.json';
let manifest = require(pathOfMF);
shell.exec('[ ! -d chrome ] && mkdir chrome');
shell.exec('cat output/fehelper.zip | npx crx3 -p ../build.pem -o chrome/fehelper.crx -x chrome/update.xml --appVersion '+manifest.version+' --crxURL https://raw.githubusercontent.com/'+manifest.author+'/FeHelper/master/fehelper.crx');

let size = fs.statSync('chrome/fehelper.crx').size;
size = pretty(size);

console.log('\n\nfehelper.crx 已打包完成!');
console.log('\n\n================================================================================');
console.log(' 当前版本:', manifest.version, '\t文件大小:', size);
console.log(' 提交到GitHub享受摆脱Chrome Webstore的自动更新吧');
console.log('================================================================================\n\n');

});

// 打包Firefox安装包
gulp.task('firefox', () => {
shell.exec('rm -rf output-firefox && cp -r output output-firefox && rm -rf output-firefox/fehelper.zip');
Expand Down Expand Up @@ -220,10 +202,6 @@ gulp.task('default', ['clean'], () => {
runSequence(['copy', 'css', 'js', 'html', 'json'], 'zip');
});

gulp.task('crx', ['clean'], () => {
runSequence(['copy', 'css', 'js', 'html', 'json'],'zip','_crx');
});

gulp.task('sync', () => {
gulp.src('apps/**/*').pipe(gulp.dest('output/apps'));
});
Expand All @@ -236,4 +214,4 @@ gulp.task('watch', () => {
console.log(new Date().toLocaleString(), '> 文件发生变化,已编译:', wp.srcPath);
}));
});
});
});
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
},
"scripts": {
"watch": "gulp watch",
"build": "gulp",
"crx": "gulp crx"
"build": "gulp"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 020ea43

Please sign in to comment.