wand v0.3.0 Wand.CLI.Commands.Upgrade View Source

Upgrade

Upgrade dependencies in your wand.json file

Usage

wand upgrade
wand upgrade poison ex_doc --latest

Options

--compile           Run mix compile after adding (default: **true**)
--download          Run mix deps.get after adding (default: **true**)
--latest            Upgrade to the latest version, ignoring wand.json restrictions

The following flags are additionally allowed if --latest is passed in:

--exact             After updating, set the version in wand.json with ^ semantics
--tilde             After updating, set the version in wand.json with ~> semantics

By default, upgrade will respect the restrictions set in your wand.json file. Meaning, if your requirement is >= 3.2.0 and < 4.0.0, and the latest version in hex is 3.7.3, wand will update the lower bound of wand.json to 3.7.3, but leave the upper bound alone.

If you want to update the upper bound, you need to use the —latest flag. The latest flag will always grab the newest (non pre) version in hex, and set that as the new lower bound. The upper bound is set to the next major version, unless you pass in the --exact or --tilde flags to override this behavior.

Wand prefers setting versions by the caret semantic. That means that the lower bound is the exact version specified, and the upper bound is the next major version. If the version is less than 1.0.0, the upper bound becomes the next minor version, and so forth.