Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-unixfs
Commits
5fa3053e
Commit
5fa3053e
authored
Oct 18, 2014
by
Henry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added command stubs
parent
ee8bcd55
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
81 additions
and
0 deletions
+81
-0
cmd/ipfs/ipfs.go
cmd/ipfs/ipfs.go
+1
-0
cmd/ipfs/update.go
cmd/ipfs/update.go
+58
-0
core/commands/update.go
core/commands/update.go
+22
-0
No files found.
cmd/ipfs/ipfs.go
View file @
5fa3053e
...
...
@@ -68,6 +68,7 @@ Use "ipfs help <command>" for more information about a command.
cmdIpfsDiag
,
cmdIpfsBlock
,
cmdIpfsObject
,
cmdIpfsUpdate
,
cmdIpfsLog
,
cmdIpfsPin
,
},
...
...
cmd/ipfs/update.go
0 → 100644
View file @
5fa3053e
package
main
import
(
flag
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/gonuts/flag"
commander
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/commander"
"github.com/jbenet/go-ipfs/core/commands"
)
var
cmdIpfsUpdate
=
&
commander
.
Command
{
UsageLine
:
"update"
,
Short
:
"check for updates and apply them"
,
Long
:
`ipfs update - check for updates and apply them
ipfs update <version> - apply
ipfs update check - just check
ipfs update log - list the changelogs
ipfs update is a utility command used to check for updates and apply them.
I wont even try, @jbenet. You do this much better :)`
,
Run
:
makeCommand
(
command
{
name
:
"updateApply"
,
args
:
0
,
flags
:
nil
,
online
:
true
,
cmdFn
:
commands
.
UpdateApply
,
}),
Subcommands
:
[]
*
commander
.
Command
{
cmdIpfsUpdateCheck
,
cmdIpfsUpdateLog
,
},
Flag
:
*
flag
.
NewFlagSet
(
"ipfs-update"
,
flag
.
ExitOnError
),
}
var
cmdIpfsUpdateCheck
=
&
commander
.
Command
{
UsageLine
:
"check"
,
Short
:
""
,
Long
:
`ipfs update check <key>`
,
Run
:
makeCommand
(
command
{
name
:
"updateCheck"
,
args
:
0
,
flags
:
nil
,
online
:
false
,
cmdFn
:
commands
.
UpdateCheck
,
}),
}
var
cmdIpfsUpdateLog
=
&
commander
.
Command
{
UsageLine
:
"log"
,
Short
:
"list the last versions and their changelog"
,
Long
:
`ipfs updage log - list the last versions and their changelog`
,
Run
:
makeCommand
(
command
{
name
:
"updateLog"
,
args
:
0
,
flags
:
nil
,
online
:
false
,
cmdFn
:
commands
.
UpdateCheck
,
}),
}
core/commands/update.go
0 → 100644
View file @
5fa3053e
package
commands
import
(
"errors"
"io"
"github.com/jbenet/go-ipfs/core"
)
// UpdateApply applys an update of the ipfs binary and shuts down the node if successful
func
UpdateApply
(
n
*
core
.
IpfsNode
,
args
[]
string
,
opts
map
[
string
]
interface
{},
out
io
.
Writer
)
error
{
return
errors
.
New
(
"TODOUpdateApply"
)
}
// UpdateCheck checks wether there is an update available
func
UpdateCheck
(
n
*
core
.
IpfsNode
,
args
[]
string
,
opts
map
[
string
]
interface
{},
out
io
.
Writer
)
error
{
return
errors
.
New
(
"TODOUpdateCheck"
)
}
func
UpdateLog
(
n
*
core
.
IpfsNode
,
args
[]
string
,
opts
map
[
string
]
interface
{},
out
io
.
Writer
)
error
{
return
errors
.
New
(
"TODOUpdateLog"
)
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment