kamakiri upgrade

Usage

kamakiri upgrade

It takes no arguments and no flags. It needs no credential and no linked project, and it never calls the API, so it works even while the server refuses your version as too old.

$ kamakiri upgrade
Checking for the latest release.
You are on v0.3.0, the latest release.
$ kamakiri upgrade
最新リリースを確認しています。
現在のバージョン v0.3.0 は最新リリースです。

When a newer release exists, the command downloads this platform’s binary into the directory of the one you are running, checks it against the checksum published with the release, and replaces the running binary last. The next kamakiri you run is the new one.

When it fails

A checksum that does not match, a release with no usable checksum for this platform, a transfer that fails partway, an install directory it cannot write to, and a latest release it cannot determine all leave the running binary untouched. The error says which it was.

Ctrl-C during the download also leaves the running binary untouched, but the partial download stays in the install directory under a name beginning with .tmp-. It is never run, and deleting it is safe.

On Windows, a successful run leaves the replaced binary beside the new one as kamakiri.exe.old, because Windows does not let a program delete its own file. The next kamakiri upgrade removes it.

A copy from a package manager

A copy that Homebrew or npm installed is left alone, and the command prints how to update it instead:

A build that did not come from a release

A build that reports (dev) as its version cannot update itself. Neither can a build whose version string cannot be read. Both point you at the releases page to install a release from.

Exit status