Skip to content

Commit 6dcd6f2

Browse files
authored
Merge pull request #143 from beNative/codex/analyze-automatic-update-system-issues-xdvup5
Stop uploading duplicate app-update manifests
2 parents ec83290 + 738ff8a commit 6dcd6f2

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

scripts/__tests__/release-workflow.test.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,14 @@ test('release workflow verifies metadata directories across platforms and publis
432432
});
433433

434434
const manifestEntries = new Set(readManifestEntries(await fs.readFile(manifestPath, 'utf8')));
435+
const appUpdateRelative = path.relative(
436+
repoPath(),
437+
path.join(ia32.releaseDir, 'win-ia32-unpacked', 'resources', 'app-update.yml'),
438+
);
439+
assert(
440+
!manifestEntries.has(appUpdateRelative),
441+
'app-update.yml should not be uploaded to the release',
442+
);
435443
const expectedMetadataUploads = [x64.metadataPath, linux.metadataPath, mac.metadataPath];
436444
for (const metadataPath of expectedMetadataUploads) {
437445
assert(metadataPath, 'metadataPath should be defined for uploaded manifests');

scripts/generate-release-notes.mjs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,17 @@ function isAutoUpdateSupportFile(filename) {
136136
return true;
137137
}
138138

139+
function shouldUploadMetadataFile(filename) {
140+
const lower = filename.toLowerCase();
141+
if (lower.endsWith('.blockmap')) {
142+
return true;
143+
}
144+
if (lower.startsWith('latest') && lower.endsWith('.yml')) {
145+
return true;
146+
}
147+
return false;
148+
}
149+
139150
function normaliseInstallerFileName(fileName) {
140151
if (!fileName.toLowerCase().endsWith('.exe')) {
141152
return fileName;
@@ -256,7 +267,7 @@ async function collectAssets(artifactRoot) {
256267
filePath,
257268
artifactDir,
258269
assetName: path.basename(filePath),
259-
upload: true,
270+
upload: shouldUploadMetadataFile(fileName),
260271
});
261272
continue;
262273
}

0 commit comments

Comments
 (0)