fix publish ipfs

publishToIpfs
yann300 4 years ago
parent 7cc6ba9050
commit 394cfe5fb2
  1. 19
      apps/remix-ide/ci/publishIpfs
  2. 1320
      package-lock.json
  3. 1
      package.json

@ -0,0 +1,19 @@
#!/usr/bin/env node
const ipfsClient = require('ipfs-http-client')
console.log('current folder', process.cwd())
const folder = process.cwd() + '/temp_publish_docker';
(async () => {
const host = 'ipfs.komputing.org' // ethdev berlin ipfs node
const ipfs = ipfsClient({ host, port: 443, protocol: 'https' })
try {
let result = await ipfs.addFromFs(folder, { recursive: true, pin: false })
const remoteFolder = result[result.length - 1]
console.log('ipfs://' + remoteFolder.hash)
console.log('https://ipfsgw.komputing.org/ipfs/' + remoteFolder.hash)
console.log('https://gateway.ipfs.io/ipfs/' + remoteFolder.hash)
} catch (e) {
console.log(e)
}
})()

1320
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -205,6 +205,7 @@
"fast-levenshtein": "^2.0.6",
"ganache-cli": "^6.8.1",
"gists": "^1.0.1",
"ipfs-http-client": "35.1.1",
"ipfs-mini": "^1.1.5",
"is-electron": "^2.2.0",
"javascript-serialize": "^1.6.1",

Loading…
Cancel
Save