Skip to content

Commit 697b52e

Browse files
committed
Fix missing resources.zip
1 parent 375c574 commit 697b52e

File tree

2 files changed

+1490
-1587
lines changed

2 files changed

+1490
-1587
lines changed

gulpfile.mjs

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -36,29 +36,25 @@ function clean() {
3636
*/
3737
function makePackageTask(library) {
3838
const packageFn = () => {
39-
const resourceZipStream =
40-
library.manifest.resources && library.manifest.resources.length
41-
? gulp
42-
.src(library.manifest.resources)
43-
.pipe(zip('Resources.zip'))
44-
: null;
39+
const resources = library.manifest.resources ?? [];
40+
const allowEmpty = !resources || resources.length === 0;
41+
if (resources.length === 0) {
42+
resources.push('does_not-match-Þõý');
43+
}
4544

4645
const templateData = {
4746
version: library.version,
4847
versionFolder: formatVersionFolder(library.version),
4948
};
50-
const filesStream = gulp
51-
.src(['LICENSE.htm', 'CHANGES.htm', '*.dnn'], {
52-
cwd: library.path,
53-
})
54-
.pipe(ejs(templateData, { delimiter: '~' }))
55-
.pipe(gulp.src(library.manifest.files));
56-
57-
const packageStream = resourceZipStream
58-
? mergeStream(filesStream, resourceZipStream)
59-
: filesStream;
60-
61-
return packageStream
49+
return mergeStream(
50+
gulp.src(resources, { allowEmpty }).pipe(zip('Resources.zip')),
51+
gulp
52+
.src(['LICENSE.htm', 'CHANGES.htm', '*.dnn'], {
53+
cwd: library.path,
54+
})
55+
.pipe(ejs(templateData, { delimiter: '~' }))
56+
)
57+
.pipe(gulp.src(library.manifest.files))
6258
.pipe(zip(`${library.name}_${library.version}.zip`))
6359
.pipe(gulp.dest('./_InstallPackages/'));
6460
};

0 commit comments

Comments
 (0)