Fix verify release assets (#699)
This commit is contained in:
@@ -59,14 +59,34 @@ async function verifyReleaseAssets() {
|
||||
console.log(`📦 Found ${assets.length} assets in release ${tagName}`);
|
||||
console.log(`📄 Release status: ${release.draft ? "DRAFT" : "PUBLISHED"}`);
|
||||
|
||||
// Define expected assets
|
||||
// Handle different beta naming conventions across platforms
|
||||
const normalizeVersionForPlatform = (version, platform) => {
|
||||
if (!version.includes("beta")) {
|
||||
return version;
|
||||
}
|
||||
|
||||
switch (platform) {
|
||||
case "rpm":
|
||||
case "deb":
|
||||
// RPM and DEB use dots: 0.14.0-beta.1 -> 0.14.0.beta.1
|
||||
return version.replace("-beta.", ".beta.");
|
||||
case "nupkg":
|
||||
// NuGet removes the dot: 0.14.0-beta.1 -> 0.14.0-beta1
|
||||
return version.replace("-beta.", "-beta");
|
||||
default:
|
||||
// Windows installer and macOS zips keep original format
|
||||
return version;
|
||||
}
|
||||
};
|
||||
|
||||
// Define expected assets with platform-specific version handling
|
||||
const expectedAssets = [
|
||||
`dyad-${version}-1.x86_64.rpm`,
|
||||
`dyad-${version}-full.nupkg`,
|
||||
`dyad-${normalizeVersionForPlatform(version, "rpm")}-1.x86_64.rpm`,
|
||||
`dyad-${normalizeVersionForPlatform(version, "nupkg")}-full.nupkg`,
|
||||
`dyad-${version}.Setup.exe`,
|
||||
`dyad-darwin-arm64-${version}.zip`,
|
||||
`dyad-darwin-x64-${version}.zip`,
|
||||
`dyad_${version}_amd64.deb`,
|
||||
`dyad_${normalizeVersionForPlatform(version, "deb")}_amd64.deb`,
|
||||
"RELEASES",
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user