Skip to content

Commit 16ee97b

Browse files
committed
Don't rely on timestamps when updating
Instead, remove previous version and then add the new one.
1 parent 8a014b2 commit 16ee97b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

task/ZipTask.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ function addToZip(zipFile, path, filesToAdd) {
1616
.map(fileName => `${path}/${fileName}`)
1717
.filter(filePath => fs.existsSync(filePath));
1818
if (existingFilePaths.length > 0) {
19+
const names = filesToAdd.join(' ');
20+
const params = `${zipFile} ${names}`;
1921
try {
20-
execSync(`cd ${path} && zip -uj ${zipFile} ${filesToAdd.join(' ')}`, {
22+
execSync(`cd ${path} && zip -d ${params} && zip -uj ${params}`, {
2123
stdio: 'pipe',
2224
});
2325
} catch (err) {

0 commit comments

Comments
 (0)