crofty 0.21.0 — crofty update, in place

Until now, moving to a new crofty meant going back to the installer. crofty update fetches the latest release and swaps it for the crofty you’re running, without leaving the terminal.

crofty update

Run it and it fetches the latest release and replaces the running crofty with it. On the installer routes it updates the bundled Hugo alongside it.

If you’re already on the latest, it says so and changes nothing.

$ crofty update
crofty is already up to date (0.21.0).

Three things it holds to. The download is checked against what the release signed for before anything on disk is replaced. If it fails partway, the crofty you already have keeps working. And the exit code is non-zero whenever nothing was updated, so a script or an agent can tell “updated” from “didn’t”.

It matches how you installed crofty

crofty update replaces crofty in place only on the released install routes. Anything else is told the manual way to update for that route, rather than being left with a half-applied update.

how you installed crofty update
.pkg (macOS) / crofty-setup.exe (Windows) / install.sh replaces it in place with the latest
a source build (go build) tells you to pull and rebuild: git pull && go build .
an install in a location you don’t own tells you to re-run the installer, or update by hand

When it can’t self-update, it says so and points you at the release, rather than touching the binary.

$ crofty update
crofty update can't update this install automatically.
To update: download the latest from https://github.com/ShiroDoromoto/crofty/releases

Getting it

Download crofty.pkg or crofty-setup.exe and double-click it. The OS will warn you once — the installers are unsigned, and getting started walks through it.

From a terminal:

curl -fsSL https://crofty.site/install.sh | sh                                          # macOS / Linux
irm https://github.com/ShiroDoromoto/crofty/releases/latest/download/install.ps1 | iex  # Windows