mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-11 06:25:57 +00:00
add ipfs release task
This commit is contained in:
parent
9b87dc79ec
commit
14e43ea5f7
19
tasks/ipfs.coffee
Normal file
19
tasks/ipfs.coffee
Normal file
@ -0,0 +1,19 @@
|
||||
module.exports = (grunt) ->
|
||||
require('shelljs/global')
|
||||
|
||||
grunt.registerTask "ipfs", "distribute into ipfs", (env_) =>
|
||||
env = env_ || "development"
|
||||
|
||||
ipfs_path = "~/go/bin"
|
||||
build_dir = "dist/dapp/"
|
||||
cmd = "#{ipfs_path}/ipfs add -r #{build_dir}"
|
||||
|
||||
grunt.log.writeln("=== adding #{cmd} to ipfs")
|
||||
result = exec(cmd)
|
||||
|
||||
rows = result.output.split("\n")
|
||||
dir_row = rows[rows.length - 2]
|
||||
dir_hash = dir_row.split(" ")[1]
|
||||
|
||||
grunt.log.writeln("=== DApp available at http://localhost:8080/ipfs/#{dir_hash}/")
|
||||
|
Loading…
x
Reference in New Issue
Block a user