Skip to content

Commit

Permalink
add sha256 hash to the lists
Browse files Browse the repository at this point in the history
check if sha256 is not set yet
  • Loading branch information
ssi91 authored and cameel committed Feb 15, 2021
1 parent 01d278d commit ecebc5e
Show file tree
Hide file tree
Showing 8 changed files with 1,414 additions and 1 deletion.
1,022 changes: 1,022 additions & 0 deletions bin/list.json

Large diffs are not rendered by default.

67 changes: 67 additions & 0 deletions emscripten-asmjs/list.json

Large diffs are not rendered by default.

67 changes: 67 additions & 0 deletions emscripten-wasm32/list.json

Large diffs are not rendered by default.

57 changes: 57 additions & 0 deletions linux-amd64/list.json

Large diffs are not rendered by default.

68 changes: 68 additions & 0 deletions macosx-amd64/list.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion update
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,12 @@ async function makeEntry (dir, parsedFileName, oldList) {
}
}

if (!build.keccak256 || !build.urls || build.urls.length !== 2) {
if (!build.sha256 || !build.keccak256 || !build.urls || build.urls.length !== 2) {
const readFile = util.promisify(fs.readFile)
const fileContent = await readFile(absolutePath)
build.keccak256 = '0x' + ethUtil.keccak(fileContent).toString('hex')
console.log("Computing hashes of '" + pathRelativeToRoot + "'")
build.sha256 = '0x' + ethUtil.sha256(fileContent).toString('hex')
build.urls = [
'bzzr://' + swarmhash(fileContent).toString('hex'),
'dweb:/ipfs/' + await ipfsHash(fileContent)
Expand Down
67 changes: 67 additions & 0 deletions wasm/list.json

Large diffs are not rendered by default.

64 changes: 64 additions & 0 deletions windows-amd64/list.json

Large diffs are not rendered by default.

0 comments on commit ecebc5e

Please sign in to comment.