Merge pull request #342 from ethereum/publishToIpfs

Publish to ipfs
pull/345/head
yann300 4 years ago committed by GitHub
commit a5b81850aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      .circleci/config.yml
  2. 19
      apps/remix-ide/ci/publishIpfs
  3. 1320
      package-lock.json
  4. 1
      package.json

@ -189,7 +189,7 @@ jobs:
- store_artifacts:
path: ./apps/remix-ide/reports/screenshots
publish-docker:
publish:
docker:
# specify the version you desire here
- image: circleci/node:10.19.0-buster
@ -213,6 +213,7 @@ jobs:
- run: npm run downloadsolc_root
- run: npm run build
- run: ./apps/remix-ide/ci/build_and_publish_docker_images.sh
- run: ./apps/remix-ide/ci/publishIpfs
deploy-remix-alpha:
docker:
@ -260,7 +261,7 @@ workflows:
- remix-ide-run-deploy:
requires:
- remix-libs
- publish-docker:
- publish:
requires:
- remix-ide-chrome
- remix-ide-firefox

@ -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