Skip to content

ipfs update command #169

@jbenet

Description

@jbenet

As discussed in #30 and #31, IPFS should be a self-updating tool. I think this should happen with:

  • an internal update routine (probably using @inconshreveable's go-update
  • a manual ipfs update command, described below.
  • optional auto-updating.

ipfs update

It should work like this:

# update to a specific (semver) version
> ipfs update <version>
> ipfs update 1.2.3
Your old version was: 1.2.2
Updated to (latest) version: 1.2.3      # (latest) only if actually latest

# update to latest minor/patch version
> ipfs update   # (if newest version is backwards-compatible)
Your old version was: 1.2.2
Updated to latest version: 1.2.3

> ipfs update   # (if newest version is backwards-incompatible)
Your old version was: 1.2.2
Updated to latest (backwards-compatible) version: 1.2.3

Note: There is a newer (backwards-incompatible) version: 2.0.0.
Run with the --latest flag to update to this version.

# update to latest version
> ipfs update latest
Your old version was: 1.2.2
Updated to latest version: 2.0.0

# list available updates, but don't update
> ipfs update check
Your current version: 1.2.2
New version available: 1.2.3

> ipfs update check
Your current version: 1.2.2
New backwards-compatible version available: 1.2.3
New backwards-incompatible version available: 2.0.0

> ipfs update log
# ipfs update log

## 1.2.3

This version includes a few simple bugfixes.

* abcdfre - fixed bug in cmd parsing
* 123abcd - fixed bug in http serve

## 1.2.2

...

Flags (these are nice-to haves, here for doc purposes):

  • --dry-run don't actually do it. go through the motions but don't actually install update. useful for testing. (maybe, not a priority)
  • --key provide a different key for checking signature
  • --ignore-signature don't check signature

The cmd help should be:

  UsageLine: "update [<version>]",
  Short:     "Update the go-ipfs tool",
  Long: `ipfs update [<version>] - Update the go-ipfs tool

    ipfs update           - Update to latest (backwards-compatible) version
    ipfs update latest    - Update to latest version
    ipfs update <version> - Update to a specific version
    ipfs update check     - List new versions available
    ipfs update log       - Shows the update log

This command updates the ipfs tool itself. It downloads new versions from the
internet, checks digital signatures, and takes care of the installation.

`,

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedSeeking public contribution on this issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions