mirror of
https://github.com/laurent22/joplin.git
synced 2024-11-24 08:12:24 +02:00
Clipper: Create a zip file of the source (for validation by Firefox reviewers) (#1648)
The file `joplin-webclipper-source.zip` will be in the `dist` directory of the webclipper.
This commit is contained in:
parent
ad211b4b4e
commit
21ae447d9c
@ -1,7 +1,8 @@
|
||||
const fs = require('fs-extra');
|
||||
const { execCommand } = require('./tool-utils.js');
|
||||
|
||||
const clipperDir = __dirname + '/../Clipper/joplin-webclipper';
|
||||
const clipperDir = __dirname + '/../Clipper/joplin-webclipper';
|
||||
const tmpSourceDir = __dirname + '/../Clipper/joplin-webclipper-source';
|
||||
|
||||
async function copyDir(baseSourceDir, sourcePath, baseDestDir) {
|
||||
await fs.mkdirp(baseDestDir + '/' + sourcePath);
|
||||
@ -76,6 +77,12 @@ async function main() {
|
||||
console.info(await execCommand('mv ' + dist.name + '.zip ..'));
|
||||
}
|
||||
|
||||
console.info('Creating source tarball for code validation...');
|
||||
process.chdir(clipperDir + '/../');
|
||||
console.info(await execCommand("rsync -a --delete --exclude 'node_modules/' --exclude 'build/' --exclude 'dist/' " + clipperDir + '/ ' + tmpSourceDir + '/'));
|
||||
console.info(await execCommand('7z a -tzip joplin-webclipper-source.zip joplin-webclipper-source'));
|
||||
console.info(await execCommand('mv joplin-webclipper-source.zip ' + clipperDir + '/dist/ && rm -rf joplin-webclipper-source'));
|
||||
|
||||
console.info(await execCommand('git pull'));
|
||||
console.info(await execCommand('git add -A'));
|
||||
console.info(await execCommand('git commit -m "Clipper release v' + newVersion + '"'));
|
||||
|
Loading…
Reference in New Issue
Block a user