aboutsummaryrefslogtreecommitdiff
path: root/dev/build.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2022-06-01 17:29:41 -0400
committerGitHub <noreply@github.com>2022-06-01 17:29:41 -0400
commite61edc387c1edeca1745c96d163a397b5bf1abdf (patch)
tree6de45bb35674e046dad6787ea8514b9e4a16c505 /dev/build.js
parentaa5e13b441da693441a27113169c2bf87f676d06 (diff)
More Safari support (#2171)
* Add support for not building a zip * Update gitignore * Add safari variant
Diffstat (limited to 'dev/build.js')
-rw-r--r--dev/build.js29
1 files changed, 16 insertions, 13 deletions
diff --git a/dev/build.js b/dev/build.js
index e9c204c5..496e5865 100644
--- a/dev/build.js
+++ b/dev/build.js
@@ -141,22 +141,25 @@ async function build(buildDir, extDir, manifestUtil, variantNames, manifestPath,
const modifiedManifest = manifestUtil.getManifest(variant.name);
- const fileNameSafe = path.basename(fileName);
- const fullFileName = path.join(buildDir, fileNameSafe);
ensureFilesExist(extDir, excludeFiles);
- if (!dryRun) {
- fs.writeFileSync(manifestPath, ManifestUtil.createManifestString(modifiedManifest));
- }
- if (!dryRun || dryRunBuildZip) {
- await createZip(extDir, excludeFiles, fullFileName, sevenZipExes, onUpdate, dryRun);
- }
+ if (typeof fileName === 'string') {
+ const fileNameSafe = path.basename(fileName);
+ const fullFileName = path.join(buildDir, fileNameSafe);
+ if (!dryRun) {
+ fs.writeFileSync(manifestPath, ManifestUtil.createManifestString(modifiedManifest));
+ }
- if (!dryRun) {
- if (Array.isArray(fileCopies)) {
- for (const fileName2 of fileCopies) {
- const fileName2Safe = path.basename(fileName2);
- fs.copyFileSync(fullFileName, path.join(buildDir, fileName2Safe));
+ if (!dryRun || dryRunBuildZip) {
+ await createZip(extDir, excludeFiles, fullFileName, sevenZipExes, onUpdate, dryRun);
+ }
+
+ if (!dryRun) {
+ if (Array.isArray(fileCopies)) {
+ for (const fileName2 of fileCopies) {
+ const fileName2Safe = path.basename(fileName2);
+ fs.copyFileSync(fullFileName, path.join(buildDir, fileName2Safe));
+ }
}
}
}