fix
This commit is contained in:
parent
b8fdf0911a
commit
5ca9325e16
@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
# Script assumes we're in basedir of the repository and that extension has been built and zipped to /dist-zip
|
# Script assumes we're in basedir of the repository and that extension has been built and zipped to /dist-zip
|
||||||
# using the crx name we want (same name as zip, except different extension)
|
# using the crx name we want (same name as zip, except different extension)
|
||||||
#
|
#
|
||||||
# also this doesn't check for errors ever so
|
# also this doesn't check for errors ever so
|
||||||
#
|
#
|
||||||
|
|
||||||
@ -42,4 +42,4 @@ sig_len_hex=$(byte_swap $(printf '%08x\n' $(ls -l "$sig" | awk '{print $5}')))
|
|||||||
echo "Wrote $crx"
|
echo "Wrote $crx"
|
||||||
|
|
||||||
echo "exiting dist-zip"
|
echo "exiting dist-zip"
|
||||||
cd ..
|
cd ..
|
||||||
|
@ -24,7 +24,7 @@ const buildZip = (src, dist, zipFilename) => {
|
|||||||
|
|
||||||
const archive = archiver('zip', { zlib: { level: 9 }});
|
const archive = archiver('zip', { zlib: { level: 9 }});
|
||||||
const stream = fs.createWriteStream(path.join(dist, zipFilename));
|
const stream = fs.createWriteStream(path.join(dist, zipFilename));
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
archive
|
archive
|
||||||
.directory(src, false)
|
.directory(src, false)
|
||||||
@ -46,14 +46,14 @@ const main = () => {
|
|||||||
browserPostfix = browser;
|
browserPostfix = browser;
|
||||||
}
|
}
|
||||||
const destDir = path.join(__dirname, `../dist-${browserPostfix}`);
|
const destDir = path.join(__dirname, `../dist-${browserPostfix}`);
|
||||||
const zipDir = path.join(__dirname, '../dist-zip');
|
const zipDir = path.join(__dirname, '../dist-zip');
|
||||||
const {name, version} = extractExtensionData(browserPostfix);
|
const {name, version} = extractExtensionData(browserPostfix);
|
||||||
|
|
||||||
// collapse spaces and dashes into single dash
|
// collapse spaces and dashes into single dash
|
||||||
const baseFilename = `${name.replace(/[ -]+/g, '-')}-${version}`;
|
const baseFilename = `${name.replace(/[ -]+/g, '-')}-${version}`;
|
||||||
|
|
||||||
let realZipDir;
|
let realZipDir;
|
||||||
|
|
||||||
if (!!testingOrNightly) {
|
if (!!testingOrNightly) {
|
||||||
realZipDir = path.join(zipDir, version);
|
realZipDir = path.join(zipDir, version);
|
||||||
} else {
|
} else {
|
||||||
@ -61,7 +61,7 @@ const main = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const zipFilename = `${baseFilename}-${browser}.zip`;
|
const zipFilename = `${baseFilename}-${browser}.zip`;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
makeDirIfNotExists(realZipDir, {recursive: true});
|
makeDirIfNotExists(realZipDir, {recursive: true});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@ -70,7 +70,7 @@ const main = () => {
|
|||||||
}
|
}
|
||||||
buildZip(destDir, realZipDir, zipFilename)
|
buildZip(destDir, realZipDir, zipFilename)
|
||||||
.then(() => console.info('OK'))
|
.then(() => console.info('OK'))
|
||||||
.catch(console.err);
|
.catch(console.err);
|
||||||
};
|
};
|
||||||
|
|
||||||
main();
|
main();
|
||||||
|
Loading…
Reference in New Issue
Block a user