Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
evertonfraga committed Jul 13, 2017
2 parents bed1ccd + e53f2d5 commit 9c9c5a6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion archives/archives.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@
"binaryMD5": "ec1abcf7b216e87645ec83954d8344cd",
"archiveMD5": "a81fd0158190d99813c738ffa4f87627"
}
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "swarm-js",
"version": "0.1.20",
"version": "0.1.22",
"description": "Swarm tools for JavaScript.",
"main": "lib/swarm.js",
"scripts": {
Expand Down
7 changes: 5 additions & 2 deletions scripts/prepareArchives.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,12 @@ got("https://gethstore.blob.core.windows.net/builds?restype=container&comp=list"
return Q.all(binaries
.filter(bin => bin.version === binaries[binaries.length - 1].version)
.map(bin => {
const archive = archives[bin.os+"-"+bin.arch] = {
const archive = archives[bin.os + "-" + bin.arch] = {
archive: bin.swarmArchiveName
};
console.log("Downloading " + bin.gethArchivePath + ".");
return files.download(bin.gethArchiveUrl)(bin.gethArchivePath)
.then(path => (console.log("Downloaded " + path + "."), path))
.then(path => decompress(path, "tmp_downloads"))
.then(() => !fs.existsSync(bin.swarmBinaryDir) && fsp.mkdir(bin.swarmBinaryDir))
.then(() => files.search(/swarm(.exe|)$/)(bin.gethFilesPath))
Expand All @@ -81,7 +83,8 @@ got("https://gethstore.blob.core.windows.net/builds?restype=container&comp=list"
.then(binaryMD5 => archive.binaryMD5 = binaryMD5)
.then(() => targz().compress(bin.swarmBinaryDir, bin.swarmArchivePath))
.then(() => files.hash("md5")(bin.swarmArchivePath))
.then(archiveMD5 => archive.archiveMD5 = archiveMD5);
.then(archiveMD5 => archive.archiveMD5 = archiveMD5)
.catch(e => console.log(e));
}))
.then(() => fs.writeFileSync("archives/archives.json", JSON.stringify(archives, null, 2)));
})
Expand Down

0 comments on commit 9c9c5a6

Please sign in to comment.