Skip to content

Commit

Permalink
Print publish progress more granularly
Browse files Browse the repository at this point in the history
  • Loading branch information
c0llab0rat0r authored and ntninja committed May 30, 2021
1 parent 3bb169a commit 9786643
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,13 @@ def publish(ipns_key: ty.Optional[str]) -> int:
print()
print(f"Exporting files to IPFS server at {ipfshttpclient.DEFAULT_ADDR}…")
client = ipfshttpclient.connect()
print('Adding files…')
hash_docs = client.add("build/html", recursive=True, raw_leaves=True, pin=False)[-1]["Hash"]
print('Getting directory hash…')
hash_main = client.object.new("unixfs-dir")["Hash"]
print('Getting docs hash…')
hash_main = client.object.patch.add_link(hash_main, "docs", hash_docs)["Hash"]
print(f'Pinning docs hash {hash_main}…')
client.pin.add(hash_main)

print("Final IPFS path:")
Expand Down

0 comments on commit 9786643

Please sign in to comment.