Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions 0.13/validate-lists.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,17 @@ if (Array.from(new Set(idsAndBranches)).length !== idsAndBranches.length)
throw new Error(
"Tool list contains at least two Tools that have the same id and versionBranch. This is not allowed."
);

// Verify that happ sha256 are the same for tools in the same versionBranch
toolListObject.tools.forEach((toolInfo) => {
if (
Array.from(
new Set(
toolInfo.versions.map((versionInfo) => versionInfo.hashes.happSha256)
)
).length > 1
)
throw new Error(
`happSha256 are not unique for tool ${toolInfo.title} and verisonBranch ${toolInfo.versionBranch}`
);
});