aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/swarm/main.go
diff options
context:
space:
mode:
authorZahoor Mohamed <zahoor@zahoor.in>2017-02-13 10:33:05 +0800
committerFelix Lange <fjl@users.noreply.github.com>2017-02-13 10:33:05 +0800
commit085987ff2cb1695881a3d0abeebbc21a4c51a2de (patch)
tree0d0eee1d7146b42a0615bf1db46bbe77d04936d7 /cmd/swarm/main.go
parentaaf9cfd18c4a7aec3196aa55dc59ce4996266f21 (diff)
downloaddexon-085987ff2cb1695881a3d0abeebbc21a4c51a2de.tar.gz
dexon-085987ff2cb1695881a3d0abeebbc21a4c51a2de.tar.zst
dexon-085987ff2cb1695881a3d0abeebbc21a4c51a2de.zip
cmd/swarm: manifest manipulation commands (#3645)
Diffstat (limited to 'cmd/swarm/main.go')
-rw-r--r--cmd/swarm/main.go37
1 files changed, 37 insertions, 0 deletions
diff --git a/cmd/swarm/main.go b/cmd/swarm/main.go
index 34b3f71c4..546c646f1 100644
--- a/cmd/swarm/main.go
+++ b/cmd/swarm/main.go
@@ -154,6 +154,43 @@ The output of this command is supposed to be machine-readable.
Prints the swarm hash of file or directory.
`,
},
+ {
+ Name: "manifest",
+ Usage: "update a MANIFEST",
+ ArgsUsage: "manifest COMMAND",
+ Description: `
+Updates a MANIFEST by adding/removing/updating the hash of a path.
+`,
+ Subcommands: []cli.Command{
+ {
+ Action: add,
+ Name: "add",
+ Usage: "add a new path to the manifest",
+ ArgsUsage: "<MANIFEST> <path> <hash> [<content-type>]",
+ Description: `
+Adds a new path to the manifest
+`,
+ },
+ {
+ Action: update,
+ Name: "update",
+ Usage: "update the hash for an already existing path in the manifest",
+ ArgsUsage: "<MANIFEST> <path> <newhash> [<newcontent-type>]",
+ Description: `
+Update the hash for an already existing path in the manifest
+`,
+ },
+ {
+ Action: remove,
+ Name: "remove",
+ Usage: "removes a path from the manifest",
+ ArgsUsage: "<MANIFEST> <path>",
+ Description: `
+Removes a path from the manifest
+`,
+ },
+ },
+ },
}
app.Flags = []cli.Flag{