Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

go-ipfs

Package Overview
Dependencies
Maintainers
1
Versions
102
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

go-ipfs - npm Package Compare versions

Comparing version 0.3.0 to 0.3.2

18

install.js

@@ -9,6 +9,7 @@ #!/usr/bin/env node

var extract = require('extract-zip')
var version = require('./package.json').version
checkPlatform(goenv) // make sure we can do this.
var filename = 'ipfs_master_' + goenv.GOOS + '-' + goenv.GOARCH + '.zip'
var filename = 'ipfs_v'+ version +'_' + goenv.GOOS + '-' + goenv.GOARCH + '.zip'
var url = 'https://gobuilder.me/get/github.com/ipfs/go-ipfs/cmd/ipfs/' + filename

@@ -19,14 +20,25 @@

var installPath = path.join(bin, 'ipfs')
var zipfile = path.join(tmp, filename)
// mk tmp dir
mkdirp(tmp, function(err) {
if (err) onerror(err)
// download binary
nugget(url, {target: filename, dir: tmp, resume: true, verbose: true}, function (err) {
if (err) return onerror(err)
extract(path.join(tmp, filename), {dir: tmp}, function (err) {
// extract zip
extract(zipfile, {dir: tmp}, function (err) {
if (err) return onerror(err)
// move ipfs binary into place.
fs.rename(path.join(tmp, "ipfs", "ipfs"), installPath, function(err) {
if (err) return onerror(err)
// remove zip from disk
fs.unlink(zipfile, function(err) {
if (err) return onerror(err)
})
})

@@ -38,3 +50,3 @@ })

function onerror (err) {
throw err
if (err) throw err
}

@@ -41,0 +53,0 @@

2

package.json
{
"name": "go-ipfs",
"version": "0.3.0",
"version": "0.3.2",
"description": "Install the latest go-ipfs binary",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -28,1 +28,5 @@ # install go-ipfs from npm

## Development
**Warning**: the file `bin/ipfs` is a placeholder, when downloading stuff, it gets replaced. so if you run `node install.js` it will then be dirty in the git repo. **Do not commit this file**, as then you would be commiting a big binary and publishing it to npm. (**TODO: add a pre-commit or pre-publish hook that warns about this**)

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc